ClassNode and classes handling them. Contains a set of
pre-defined instances for the most used types and some code for cached node
creation and basic handling.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| private static final Class | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| protected static final ClassNode[] | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final String | |
| public static final ClassNode | |
| public static final ClassNode | |
| private static final Map | |
| private static final String[] | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final ClassNode | |
| public static final Class | |
| public static final ClassNode | |
| private static final ClassNode[] | |
| private static final int | |
| public static final ClassNode | |
| public static final ClassNode | |
| private static final Map |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static MethodNode | |
| public static ClassNode | getNextSuperClass(final ClassNode source, final ClassNode target)
Returns a super class or interface for a given class depending on supplied target. |
| public static ClassNode | |
| public static ClassNode | getWrapper(ClassNode
the ClassNode containing a possible primitive type cn)Creates a ClassNode containing the wrapper of a ClassNode of primitive type. |
| private static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | isGeneratedFunction(final ClassNode type)
Checks if the type is a generated function, i.e. closure or lambda. |
| public static boolean | |
| public static boolean | Returns: true if the ClassNode is a primitive typethe ClassNode containing a possible primitive type cn)Test to determine if a ClassNode is a primitive type. |
| public static boolean | |
| public static boolean | Returns: true if the ClassNode is of int, float, long, double or String typethe ClassNode to be tested cn)Test to determine if a ClassNode is a type belongs to the list of types which are allowed to initialize constants directly in bytecode instead of using <cinit> Note this only works for ClassNodes created using a predefined ClassNode |
| public static ClassNode[] | |
| public static ClassNode | |
| public static ClassNode | |
| public static ClassNode | |
| public static ClassNode | |
| public static ClassNode | |
| public static ClassNode | |
| public static ClassNode | |
| public static ClassNode | makeWithoutCaching(String
of the class the ClassNode is representing name)Creates a ClassNode using a given class. |
| ABSTRACT_STATIC_PRIVATE | back to summary |
|---|---|
| private static final int ABSTRACT_STATIC_PRIVATE | |
| Annotation_TYPE | back to summary |
|---|---|
| public static final ClassNode Annotation_TYPE | |
| AUTOCLOSEABLE_TYPE | back to summary |
|---|---|
| public static final ClassNode AUTOCLOSEABLE_TYPE | |
| BigDecimal_TYPE | back to summary |
|---|---|
| public static final ClassNode BigDecimal_TYPE | |
| BigInteger_TYPE | back to summary |
|---|---|
| public static final ClassNode BigInteger_TYPE | |
| BINDING_TYPE | back to summary |
|---|---|
| public static final ClassNode BINDING_TYPE | |
| boolean_TYPE | back to summary |
|---|---|
| public static final ClassNode boolean_TYPE | |
| Boolean_TYPE | back to summary |
|---|---|
| public static final ClassNode Boolean_TYPE | |
| byte_TYPE | back to summary |
|---|---|
| public static final ClassNode byte_TYPE | |
| Byte_TYPE | back to summary |
|---|---|
| public static final ClassNode Byte_TYPE | |
| char_TYPE | back to summary |
|---|---|
| public static final ClassNode char_TYPE | |
| Character_TYPE | back to summary |
|---|---|
| public static final ClassNode Character_TYPE | |
| CLASS_Type | back to summary |
|---|---|
| public static final ClassNode CLASS_Type | |
| classes | back to summary |
|---|---|
| private static final Class<T>[] classes | |
| CLOSURE_TYPE | back to summary |
|---|---|
| public static final ClassNode CLOSURE_TYPE | |
| COMPARABLE_TYPE | back to summary |
|---|---|
| public static final ClassNode COMPARABLE_TYPE | |
| double_TYPE | back to summary |
|---|---|
| public static final ClassNode double_TYPE | |
| Double_TYPE | back to summary |
|---|---|
| public static final ClassNode Double_TYPE | |
| DYNAMIC_TYPE | back to summary |
|---|---|
| public static final ClassNode DYNAMIC_TYPE | |
| ELEMENT_TYPE_TYPE | back to summary |
|---|---|
| public static final ClassNode ELEMENT_TYPE_TYPE | |
| EMPTY_TYPE_ARRAY | back to summary |
|---|---|
| protected static final ClassNode[] EMPTY_TYPE_ARRAY | |
| Enum_Type | back to summary |
|---|---|
| public static final ClassNode Enum_Type | |
| float_TYPE | back to summary |
|---|---|
| public static final ClassNode float_TYPE | |
| Float_TYPE | back to summary |
|---|---|
| public static final ClassNode Float_TYPE | |
| GENERATED_CLOSURE_Type | back to summary |
|---|---|
| public static final ClassNode GENERATED_CLOSURE_Type | |
| GENERATED_LAMBDA_TYPE | back to summary |
|---|---|
| public static final ClassNode GENERATED_LAMBDA_TYPE | |
| GROOVY_INTERCEPTABLE_TYPE | back to summary |
|---|---|
| public static final ClassNode GROOVY_INTERCEPTABLE_TYPE | |
| GROOVY_OBJECT_SUPPORT_TYPE | back to summary |
|---|---|
| public static final ClassNode GROOVY_OBJECT_SUPPORT_TYPE | |
| GROOVY_OBJECT_TYPE | back to summary |
|---|---|
| public static final ClassNode GROOVY_OBJECT_TYPE | |
| GSTRING_TYPE | back to summary |
|---|---|
| public static final ClassNode GSTRING_TYPE | |
| int_TYPE | back to summary |
|---|---|
| public static final ClassNode int_TYPE | |
| Integer_TYPE | back to summary |
|---|---|
| public static final ClassNode Integer_TYPE | |
| Iterator_TYPE | back to summary |
|---|---|
| public static final ClassNode Iterator_TYPE | |
| LIST_TYPE | back to summary |
|---|---|
| public static final ClassNode LIST_TYPE | |
| long_TYPE | back to summary |
|---|---|
| public static final ClassNode long_TYPE | |
| Long_TYPE | back to summary |
|---|---|
| public static final ClassNode Long_TYPE | |
| MAP_TYPE | back to summary |
|---|---|
| public static final ClassNode MAP_TYPE | |
| METACLASS_TYPE | back to summary |
|---|---|
| public static final ClassNode METACLASS_TYPE | |
| Number_TYPE | back to summary |
|---|---|
| public static final ClassNode Number_TYPE | |
| OBJECT | back to summary |
|---|---|
| public static final String OBJECT | |
| OBJECT_TYPE | back to summary |
|---|---|
| public static final ClassNode OBJECT_TYPE | |
| PATTERN_TYPE | back to summary |
|---|---|
| public static final ClassNode PATTERN_TYPE | |
| PRIMITIVE_TYPE_TO_WRAPPER_TYPE_MAP | back to summary |
|---|---|
| private static final Map<ClassNode, ClassNode> PRIMITIVE_TYPE_TO_WRAPPER_TYPE_MAP | |
| primitiveClassNames | back to summary |
|---|---|
| private static final String[] primitiveClassNames | |
| RANGE_TYPE | back to summary |
|---|---|
| public static final ClassNode RANGE_TYPE | |
| REFERENCE_TYPE | back to summary |
|---|---|
| public static final ClassNode REFERENCE_TYPE | |
| SCRIPT_TYPE | back to summary |
|---|---|
| public static final ClassNode SCRIPT_TYPE | |
| SERIALIZABLE_TYPE | back to summary |
|---|---|
| public static final ClassNode SERIALIZABLE_TYPE | |
| SERIALIZEDLAMBDA_TYPE | back to summary |
|---|---|
| public static final ClassNode SERIALIZEDLAMBDA_TYPE | |
| short_TYPE | back to summary |
|---|---|
| public static final ClassNode short_TYPE | |
| Short_TYPE | back to summary |
|---|---|
| public static final ClassNode Short_TYPE | |
| STRING_TYPE | back to summary |
|---|---|
| public static final ClassNode STRING_TYPE | |
| THROWABLE_TYPE | back to summary |
|---|---|
| public static final ClassNode THROWABLE_TYPE | |
| TUPLE_CLASSES | back to summary |
|---|---|
| public static final Class<T>[] TUPLE_CLASSES | |
| TUPLE_TYPE | back to summary |
|---|---|
| public static final ClassNode TUPLE_TYPE | |
| types | back to summary |
|---|---|
| private static final ClassNode[] types | |
| VISIBILITY | back to summary |
|---|---|
| private static final int VISIBILITY | |
| VOID_TYPE | back to summary |
|---|---|
| public static final ClassNode VOID_TYPE | |
| void_WRAPPER_TYPE | back to summary |
|---|---|
| public static final ClassNode void_WRAPPER_TYPE | |
| WRAPPER_TYPE_TO_PRIMITIVE_TYPE_MAP | back to summary |
|---|---|
| private static final Map<ClassNode, ClassNode> WRAPPER_TYPE_TO_PRIMITIVE_TYPE_MAP | |
| ClassHelper | back to summary |
|---|---|
| public ClassHelper() | |
| findSAM | back to summary |
|---|---|
| public static MethodNode findSAM(final ClassNode type) Returns the single abstract method of a class node, if it is a SAM type, or null otherwise.
| |
| getNextSuperClass | back to summary |
|---|---|
| public static ClassNode getNextSuperClass(final ClassNode source, final ClassNode target) Returns a super class or interface for a given class depending on supplied target. If the target is not a super class or interface, then null will be returned. For a non-primitive array type -- if the target is also an array -- returns an array of the component type's super class or interface. | |
| getUnwrapper | back to summary |
|---|---|
| public static ClassNode getUnwrapper(ClassNode cn) | |
| getWrapper | back to summary |
|---|---|
| public static ClassNode getWrapper(ClassNode cn) Creates a ClassNode containing the wrapper of a ClassNode of primitive type. Any ClassNode representing a primitive type should be created using the predefined types used in class. The method will check the parameter for known references of ClassNode representing a primitive type. If Reference is found, then a ClassNode will be contained that represents the wrapper class. For example for boolean, the wrapper class is java.lang.Boolean. If the parameter is no primitive type, the redirected ClassNode will be returned
| |
| hasUsableImplementation | back to summary |
|---|---|
| private static boolean hasUsableImplementation(ClassNode c, MethodNode m) | |
| isCachedType | back to summary |
|---|---|
| public static boolean isCachedType(ClassNode type) | |
| isFunctionalInterface | back to summary |
|---|---|
| public static boolean isFunctionalInterface(final ClassNode type) | |
| isGeneratedFunction | back to summary |
|---|---|
| public static boolean isGeneratedFunction(final ClassNode type) Checks if the type is a generated function, i.e. closure or lambda.
| |
| isNumberType | back to summary |
|---|---|
| public static boolean isNumberType(ClassNode cn) | |
| isPrimitiveType | back to summary |
|---|---|
| public static boolean isPrimitiveType(ClassNode cn) Test to determine if a ClassNode is a primitive type. Note this only works for ClassNodes created using a predefined ClassNode
| |
| isSAMType | back to summary |
|---|---|
| public static boolean isSAMType(final ClassNode type) | |
| isStaticConstantInitializerType | back to summary |
|---|---|
| public static boolean isStaticConstantInitializerType(ClassNode cn) Test to determine if a ClassNode is a type belongs to the list of types which are allowed to initialize constants directly in bytecode instead of using <cinit> Note this only works for ClassNodes created using a predefined ClassNode
| |
| make | back to summary |
|---|---|
| public static ClassNode[] make(Class<T>[] classes) Creates an array of ClassNodes using an array of classes. For each of the given classes a new ClassNode will be created
| |
| make | back to summary |
|---|---|
| public static ClassNode make(Class<T> c) Creates a ClassNode using a given class. A new ClassNode object is only created if the class is not one of the predefined ones | |
| make | back to summary |
|---|---|
| public static ClassNode make(Class<T> c, boolean includeGenerics) | |
| make | back to summary |
|---|---|
| public static ClassNode make(String name) Creates a ClassNode using a given class. If the name is one of the predefined ClassNodes then the corresponding ClassNode instance will be returned. If the name is null or of length 0 the dynamic type is returned
| |
| makeCached | back to summary |
|---|---|
| public static ClassNode makeCached(Class<T> c) | |
| makeReference | back to summary |
|---|---|
| public static ClassNode makeReference() | |
| makeWithoutCaching | back to summary |
|---|---|
| public static ClassNode makeWithoutCaching(Class<T> c) | |
| makeWithoutCaching | back to summary |
|---|---|
| public static ClassNode makeWithoutCaching(Class<T> c, boolean includeGenerics) | |
| makeWithoutCaching | back to summary |
|---|---|
| public static ClassNode makeWithoutCaching(String name) Creates a ClassNode using a given class. Unlike make(String) this method will not use the cache to create the ClassNode. This means the ClassNode created from this method using the same name will have a different reference
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static ManagedConcurrentMap |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| classCache | back to summary |
|---|---|
| pack-priv static ManagedConcurrentMap<Class<T>, SoftReference<ClassNode>> classCache | |
| ClassHelperCache | back to summary |
|---|---|
| pack-priv ClassHelperCache() | |