< prev index next >

buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/Main.java

Print this page

        

*** 138,148 **** // simple class name without package prefix String simpleName = inFile.getName(); simpleName = simpleName.substring(0, simpleName.indexOf(".class")); ! if (sci.getPrototypeMemberCount() > 0) { // generate prototype class final PrototypeGenerator protGen = new PrototypeGenerator(sci); buf = protGen.getClassBytes(); if (DEBUG) { verify(buf); --- 138,148 ---- // simple class name without package prefix String simpleName = inFile.getName(); simpleName = simpleName.substring(0, simpleName.indexOf(".class")); ! if (sci.isPrototypeNeeded()) { // generate prototype class final PrototypeGenerator protGen = new PrototypeGenerator(sci); buf = protGen.getClassBytes(); if (DEBUG) { verify(buf);
*** 150,160 **** try (FileOutputStream fos = new FileOutputStream(new File(outDir, simpleName + StringConstants.PROTOTYPE_SUFFIX + ".class"))) { fos.write(buf); } } ! if (sci.getConstructorMemberCount() > 0 || sci.getConstructor() != null) { // generate constructor class final ConstructorGenerator consGen = new ConstructorGenerator(sci); buf = consGen.getClassBytes(); if (DEBUG) { verify(buf); --- 150,160 ---- try (FileOutputStream fos = new FileOutputStream(new File(outDir, simpleName + StringConstants.PROTOTYPE_SUFFIX + ".class"))) { fos.write(buf); } } ! if (sci.isConstructorNeeded()) { // generate constructor class final ConstructorGenerator consGen = new ConstructorGenerator(sci); buf = consGen.getClassBytes(); if (DEBUG) { verify(buf);
< prev index next >