< prev index next >

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

Print this page

        

@@ -138,11 +138,11 @@
 
                 // simple class name without package prefix
                 String simpleName = inFile.getName();
                 simpleName = simpleName.substring(0, simpleName.indexOf(".class"));
 
-                if (sci.getPrototypeMemberCount() > 0) {
+                if (sci.isPrototypeNeeded()) {
                     // generate prototype class
                     final PrototypeGenerator protGen = new PrototypeGenerator(sci);
                     buf = protGen.getClassBytes();
                     if (DEBUG) {
                         verify(buf);

@@ -150,11 +150,11 @@
                     try (FileOutputStream fos = new FileOutputStream(new File(outDir, simpleName + StringConstants.PROTOTYPE_SUFFIX + ".class"))) {
                         fos.write(buf);
                     }
                 }
 
-                if (sci.getConstructorMemberCount() > 0 || sci.getConstructor() != null) {
+                if (sci.isConstructorNeeded()) {
                     // generate constructor class
                     final ConstructorGenerator consGen = new ConstructorGenerator(sci);
                     buf = consGen.getClassBytes();
                     if (DEBUG) {
                         verify(buf);
< prev index next >