Java Code Examples for jdk.nashorn.internal.objects.annotations.Where#PROTOTYPE
The following examples show how to use
jdk.nashorn.internal.objects.annotations.Where#PROTOTYPE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ScriptClassInfo.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
int getPrototypeMemberCount() { int count = 0; for (final MemberInfo memInfo : members) { switch (memInfo.getKind()) { case SETTER: case SPECIALIZED_FUNCTION: // SETTER was counted when GETTER was encountered. // SPECIALIZED_FUNCTION was counted as FUNCTION already. continue; } if (memInfo.getWhere() == Where.PROTOTYPE) { count++; } } return count; }
Example 2
Source File: ScriptClassInfo.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
int getPrototypeMemberCount() { int count = 0; for (final MemberInfo memInfo : members) { switch (memInfo.getKind()) { case SETTER: case SPECIALIZED_FUNCTION: // SETTER was counted when GETTER was encountered. // SPECIALIZED_FUNCTION was counted as FUNCTION already. continue; } if (memInfo.getWhere() == Where.PROTOTYPE) { count++; } } return count; }
Example 3
Source File: ScriptClassInfo.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
int getPrototypeMemberCount() { int count = 0; for (final MemberInfo memInfo : members) { switch (memInfo.getKind()) { case SETTER: case SPECIALIZED_FUNCTION: // SETTER was counted when GETTER was encountered. // SPECIALIZED_FUNCTION was counted as FUNCTION already. continue; } if (memInfo.getWhere() == Where.PROTOTYPE) { count++; } } return count; }
Example 4
Source File: ScriptClassInfo.java From nashorn with GNU General Public License v2.0 | 5 votes |
int getPrototypeMemberCount() { int count = 0; for (final MemberInfo memInfo : members) { if (memInfo.getWhere() == Where.PROTOTYPE || memInfo.isConstructor()) { count++; } } return count; }
Example 5
Source File: ScriptClassInfo.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
boolean isPrototypeNeeded() { // Prototype class generation is needed if we have at least one // prototype property or @Constructor defined in the class. for (final MemberInfo memInfo : members) { if (memInfo.getWhere() == Where.PROTOTYPE || memInfo.isConstructor()) { return true; } } return false; }
Example 6
Source File: ScriptClassInfo.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
boolean isPrototypeNeeded() { // Prototype class generation is needed if we have at least one // prototype property or @Constructor defined in the class. for (final MemberInfo memInfo : members) { if (memInfo.getWhere() == Where.PROTOTYPE || memInfo.isConstructor()) { return true; } } return false; }
Example 7
Source File: MemberInfo.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
boolean isPrototypeFunction() { return kind == Kind.FUNCTION && where == Where.PROTOTYPE; }
Example 8
Source File: MemberInfo.java From hottub with GNU General Public License v2.0 | 4 votes |
boolean isPrototypeSetter() { return kind == Kind.SETTER && where == Where.PROTOTYPE; }
Example 9
Source File: MemberInfo.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
boolean isPrototypeProperty() { return kind == Kind.PROPERTY && where == Where.PROTOTYPE; }
Example 10
Source File: MemberInfo.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
boolean isPrototypeProperty() { return kind == Kind.PROPERTY && where == Where.PROTOTYPE; }
Example 11
Source File: MemberInfo.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
boolean isPrototypeFunction() { return kind == Kind.FUNCTION && where == Where.PROTOTYPE; }
Example 12
Source File: MemberInfo.java From nashorn with GNU General Public License v2.0 | 4 votes |
boolean isPrototypeGetter() { return kind == Kind.GETTER && where == Where.PROTOTYPE; }
Example 13
Source File: MemberInfo.java From jdk8u_nashorn with GNU General Public License v2.0 | 4 votes |
boolean isPrototypeSetter() { return kind == Kind.SETTER && where == Where.PROTOTYPE; }
Example 14
Source File: MemberInfo.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
boolean isPrototypeFunction() { return kind == Kind.FUNCTION && where == Where.PROTOTYPE; }
Example 15
Source File: MemberInfo.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
boolean isPrototypeFunction() { return kind == Kind.FUNCTION && where == Where.PROTOTYPE; }
Example 16
Source File: MemberInfo.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
boolean isPrototypeSetter() { return kind == Kind.SETTER && where == Where.PROTOTYPE; }
Example 17
Source File: NativeArray.java From openjdk-jdk9 with GNU General Public License v2.0 | 2 votes |
/** * Prototype length setter * @param self self reference * @param length new length property */ @Setter(name = "length", where = Where.PROTOTYPE, attributes = Attribute.NOT_ENUMERABLE | Attribute.NOT_CONFIGURABLE) public static void setProtoLength(final Object self, final Object length) { length(self, length); // Same as instance setter but we can't make nasgen use the same method for prototype }
Example 18
Source File: NativeArray.java From openjdk-jdk8u with GNU General Public License v2.0 | 2 votes |
/** * Prototype length setter * @param self self reference * @param length new length property */ @Setter(name = "length", where = Where.PROTOTYPE, attributes = Attribute.NOT_ENUMERABLE | Attribute.NOT_CONFIGURABLE) public static void setProtoLength(final Object self, final Object length) { length(self, length); // Same as instance setter but we can't make nasgen use the same method for prototype }
Example 19
Source File: NativeArray.java From jdk8u_nashorn with GNU General Public License v2.0 | 2 votes |
/** * Prototype length getter * @param self self reference * @return the length of the object */ @Getter(name = "length", where = Where.PROTOTYPE, attributes = Attribute.NOT_ENUMERABLE | Attribute.NOT_CONFIGURABLE) public static Object getProtoLength(final Object self) { return length(self); // Same as instance getter but we can't make nasgen use the same method for prototype }
Example 20
Source File: NativeArray.java From openjdk-jdk9 with GNU General Public License v2.0 | 2 votes |
/** * Prototype length getter * @param self self reference * @return the length of the object */ @Getter(name = "length", where = Where.PROTOTYPE, attributes = Attribute.NOT_ENUMERABLE | Attribute.NOT_CONFIGURABLE) public static Object getProtoLength(final Object self) { return length(self); // Same as instance getter but we can't make nasgen use the same method for prototype }