< prev index next >

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

Print this page




 271                                 memInfo.setName(name == null ? methodName : name);
 272                             }
 273                             memInfo.setAttributes(attributes == null ? MemberInfo.DEFAULT_ATTRIBUTES : attributes);
 274 
 275                             memInfo.setArity((arity == null)? MemberInfo.DEFAULT_ARITY : arity);
 276                             if (where == null) {
 277                                 // by default @Getter/@Setter belongs to INSTANCE
 278                                 // @Function belong to PROTOTYPE.
 279                                 switch (memInfo.getKind()) {
 280                                     case GETTER:
 281                                     case SETTER:
 282                                         where = Where.INSTANCE;
 283                                         break;
 284                                     case CONSTRUCTOR:
 285                                         where = Where.CONSTRUCTOR;
 286                                         break;
 287                                     case FUNCTION:
 288                                         where = Where.PROTOTYPE;
 289                                         break;
 290                                     case SPECIALIZED_FUNCTION:
 291                                         if (isSpecializedConstructor) {
 292                                             where = Where.CONSTRUCTOR;
 293                                         }
 294                                         //fallthru
 295                                     default:
 296                                         break;
 297                                 }
 298                             }
 299                             memInfo.setWhere(where);
 300                             memInfo.setLinkLogicClass(linkLogicClass);
 301                             memInfo.setIsSpecializedConstructor(isSpecializedConstructor);
 302                             memInfo.setIsOptimistic(isOptimistic);
 303                         }
 304                     };
 305                 }
 306 
 307                 return delegateAV;
 308             }
 309         };
 310     }
 311 
 312     ScriptClassInfo getScriptClassInfo() {
 313         ScriptClassInfo sci = null;




 271                                 memInfo.setName(name == null ? methodName : name);
 272                             }
 273                             memInfo.setAttributes(attributes == null ? MemberInfo.DEFAULT_ATTRIBUTES : attributes);
 274 
 275                             memInfo.setArity((arity == null)? MemberInfo.DEFAULT_ARITY : arity);
 276                             if (where == null) {
 277                                 // by default @Getter/@Setter belongs to INSTANCE
 278                                 // @Function belong to PROTOTYPE.
 279                                 switch (memInfo.getKind()) {
 280                                     case GETTER:
 281                                     case SETTER:
 282                                         where = Where.INSTANCE;
 283                                         break;
 284                                     case CONSTRUCTOR:
 285                                         where = Where.CONSTRUCTOR;
 286                                         break;
 287                                     case FUNCTION:
 288                                         where = Where.PROTOTYPE;
 289                                         break;
 290                                     case SPECIALIZED_FUNCTION:
 291                                         where = isSpecializedConstructor? Where.CONSTRUCTOR : Where.PROTOTYPE;


 292                                         //fallthru
 293                                     default:
 294                                         break;
 295                                 }
 296                             }
 297                             memInfo.setWhere(where);
 298                             memInfo.setLinkLogicClass(linkLogicClass);
 299                             memInfo.setIsSpecializedConstructor(isSpecializedConstructor);
 300                             memInfo.setIsOptimistic(isOptimistic);
 301                         }
 302                     };
 303                 }
 304 
 305                 return delegateAV;
 306             }
 307         };
 308     }
 309 
 310     ScriptClassInfo getScriptClassInfo() {
 311         ScriptClassInfo sci = null;


< prev index next >