| Modifier and Type | Class and Description |
|---|---|
| public static @interface | Traits.Implemented
Internal annotation used to indicate which methods in a trait interface have a default implementation. |
| public static @interface | Traits.TraitBridge
Internal annotation used to indicate that a method is a bridge method to a trait default implementation. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final int | |
| pack-priv static final List | |
| public static final ClassNode | |
| public static final ClassNode | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| public static final ClassNode | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| public static final String | |
| pack-priv static final String | |
| public static final String | |
| public static final Class | |
| public static final ClassNode | |
| pack-priv static final String | |
| pack-priv static final String | |
| public static final ClassNode |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static LinkedHashSet | collectAllInterfacesReverseOrder(final ClassNode
a class node cNode, final LinkedHashSet<ClassNode> ordered set of interfaces interfaces)Collects all interfaces of a class node, but reverses the order of the declaration of direct interfaces of this class node. |
| public static LinkedHashSet | Returns: theselfTypes collectiona class node that may implement a trait receiver, final LinkedHashSet<ClassNode> a set where the self types will be put selfTypes)Collects all the self types that a type should extend or implement, given the traits is implements. |
| public static LinkedHashSet | Returns: theselfTypes collectiona class node that may implement a trait receiver, final LinkedHashSet<ClassNode> a set where the self types will be put selfTypes, final boolean should the interfaces that the node implements be collected too checkInterfaces, final boolean should we collect from the superclass too checkSuperClass)Collects all the self types that a type should extend or implement, given the traits is implements. |
| public static String[] | decomposeSuperCallName(final String methodName)
Returns the trait and method names derived from super-trait name scheme
or |
| pack-priv static String | |
| public static ClassNode | |
| public static ClassNode | |
| pack-priv static TraitHelpersTuple | |
| public static ClassNode | |
| public static List | Returns: the list of ordered trait classnodesthe given classnode cNode)Find all traits associated with the given type. |
| public static <T> T | |
| public static Method | Returns: null if it is not a method implemented in a trait. If it is, returns the method from the trait class.a method node someMethod)Reflection API to find the method corresponding to the default implementation of a trait, given a bridge method. |
| pack-priv static String | |
| public static boolean | Returns: true if the method has a default implementation in the traita method node method)Indicates whether a method in a trait interface has a default implementation. |
| public static boolean | Returns: true if the method has a default implementation in the traita method node method)Indicates whether a method in a trait interface has a default implementation. |
| pack-priv static String | |
| pack-priv static String | |
| pack-priv static String | |
| public static boolean | Returns: true if the specified class node is annotated with theTrait interface.a class node cNode)Returns true if the specified class node is annotated with the |
| public static boolean | Returns: null if it is not a method implemented in a trait. If it is, returns the method from the trait class.a method node someMethod)Reflection API to indicate whether some method is a bridge method to the default implementation of a trait. |
| public static boolean | |
| public static boolean | |
| pack-priv static String | |
| pack-priv static String | |
| private static ClassNode |
| DIRECT_GETTER_SUFFIX | back to summary |
|---|---|
| pack-priv static final String DIRECT_GETTER_SUFFIX | |
| DIRECT_SETTER_SUFFIX | back to summary |
|---|---|
| pack-priv static final String DIRECT_SETTER_SUFFIX | |
| FIELD_HELPER | back to summary |
|---|---|
| pack-priv static final String FIELD_HELPER | |
| FIELD_PREFIX | back to summary |
|---|---|
| pack-priv static final String FIELD_PREFIX | |
| FIELD_PREFIX_MASK | back to summary |
|---|---|
| pack-priv static final int FIELD_PREFIX_MASK | |
| FIELD_PREFIXES | back to summary |
|---|---|
| pack-priv static final List<Integer> FIELD_PREFIXES | |
| GENERATED_PROXY_CLASSNODE | back to summary |
|---|---|
| public static final ClassNode GENERATED_PROXY_CLASSNODE | |
| IMPLEMENTED_CLASSNODE | back to summary |
|---|---|
| public static final ClassNode IMPLEMENTED_CLASSNODE | |
| INIT_METHOD | back to summary |
|---|---|
| pack-priv static final String INIT_METHOD | |
| PRIVATE_FIELD_PREFIX | back to summary |
|---|---|
| pack-priv static final String PRIVATE_FIELD_PREFIX | |
| PUBLIC_FIELD_PREFIX | back to summary |
|---|---|
| pack-priv static final String PUBLIC_FIELD_PREFIX | |
| SELFTYPE_CLASSNODE | back to summary |
|---|---|
| public static final ClassNode SELFTYPE_CLASSNODE | |
| STATIC_FIELD_HELPER | back to summary |
|---|---|
| pack-priv static final String STATIC_FIELD_HELPER | |
| STATIC_FIELD_PREFIX | back to summary |
|---|---|
| pack-priv static final String STATIC_FIELD_PREFIX | |
| STATIC_INIT_METHOD | back to summary |
|---|---|
| pack-priv static final String STATIC_INIT_METHOD | |
| STATIC_THIS_OBJECT | back to summary |
|---|---|
| public static final String STATIC_THIS_OBJECT | |
| SUPER_TRAIT_METHOD_PREFIX | back to summary |
|---|---|
| pack-priv static final String SUPER_TRAIT_METHOD_PREFIX | |
| THIS_OBJECT | back to summary |
|---|---|
| public static final String THIS_OBJECT | |
| TRAIT_CLASS | back to summary |
|---|---|
| public static final Class<Trait> TRAIT_CLASS | |
| TRAIT_CLASSNODE | back to summary |
|---|---|
| public static final ClassNode TRAIT_CLASSNODE | |
| TRAIT_HELPER | back to summary |
|---|---|
| pack-priv static final String TRAIT_HELPER | |
| TRAIT_TYPE_NAME | back to summary |
|---|---|
| pack-priv static final String TRAIT_TYPE_NAME | |
| TRAITBRIDGE_CLASSNODE | back to summary |
|---|---|
| public static final ClassNode TRAITBRIDGE_CLASSNODE | |
| Traits | back to summary |
|---|---|
| public Traits() | |
| collectAllInterfacesReverseOrder | back to summary |
|---|---|
| public static LinkedHashSet Collects all interfaces of a class node, but reverses the order of the declaration of direct interfaces of this class node. This is used to make sure a trait implementing A,B where both A and B have the same method will take the method from B (latest), aligning the behavior with categories.
| |
| collectSelfTypes | back to summary |
|---|---|
| public static LinkedHashSet Collects all the self types that a type should extend or implement, given the traits is implements. Collects from interfaces and superclasses too.
| |
| collectSelfTypes | back to summary |
|---|---|
| public static LinkedHashSet Collects all the self types that a type should extend or implement, given the traits is implements.
| |
| decomposeSuperCallName | back to summary |
|---|---|
| public static String[] decomposeSuperCallName(final String methodName) Returns the trait and method names derived from super-trait name scheme
or | |
| fieldHelperClassName | back to summary |
|---|---|
| pack-priv static String fieldHelperClassName(final ClassNode traitNode) | |
| findFieldHelper | back to summary |
|---|---|
| public static ClassNode findFieldHelper(final ClassNode trait) | |
| findHelper | back to summary |
|---|---|
| public static ClassNode findHelper(final ClassNode trait) | |
| findHelpers | back to summary |
|---|---|
| pack-priv static TraitHelpersTuple findHelpers(final ClassNode trait) | |
| findStaticFieldHelper | back to summary |
|---|---|
| public static ClassNode findStaticFieldHelper(final ClassNode trait) | |
| findTraits | back to summary |
|---|---|
| public static List Find all traits associated with the given type. | |
| getAsType | back to summary |
|---|---|
| public static <T> T getAsType(Object self, Class<T> clazz) Converts a class implementing some trait into a target class. If the trait is a dynamic proxy and
that the target class is assignable to the target object of the proxy, then the target object is
returned. Otherwise, falls back to
| |
| getBridgeMethodTarget | back to summary |
|---|---|
| public static Method getBridgeMethodTarget(Method someMethod) Reflection API to find the method corresponding to the default implementation of a trait, given a bridge method. | |
| getSuperTraitMethodName | back to summary |
|---|---|
| pack-priv static String getSuperTraitMethodName(ClassNode trait, String method) | |
| hasDefaultImplementation | back to summary |
|---|---|
| public static boolean hasDefaultImplementation(final MethodNode method) Indicates whether a method in a trait interface has a default implementation.
| |
| hasDefaultImplementation | back to summary |
|---|---|
| public static boolean hasDefaultImplementation(final Method method) Indicates whether a method in a trait interface has a default implementation.
| |
| helperClassName | back to summary |
|---|---|
| pack-priv static String helperClassName(final ClassNode traitNode) | |
| helperGetterName | back to summary |
|---|---|
| pack-priv static String helperGetterName(final FieldNode field) | |
| helperSetterName | back to summary |
|---|---|
| pack-priv static String helperSetterName(final FieldNode field) | |
| isAnnotatedWithTrait | back to summary |
|---|---|
| public static boolean isAnnotatedWithTrait(final ClassNode cNode) Returns true if the specified class node is annotated with the | |
| isBridgeMethod | back to summary |
|---|---|
| public static boolean isBridgeMethod(Method someMethod) Reflection API to indicate whether some method is a bridge method to the default implementation of a trait.
| |
| isTrait | back to summary |
|---|---|
| public static boolean isTrait(final ClassNode cNode) Returns true if the specified class node is a trait.
| |
| isTrait | back to summary |
|---|---|
| public static boolean isTrait(final Class<?> clazz) Returns true if the specified class is a trait.
| |
| remappedFieldName | back to summary |
|---|---|
| pack-priv static String remappedFieldName(final ClassNode traitNode, final String name) | |
| staticFieldHelperClassName | back to summary |
|---|---|
| pack-priv static String staticFieldHelperClassName(final ClassNode traitNode) | |
| unwrapOwner | back to summary |
|---|---|
| private static ClassNode unwrapOwner(ClassNode owner) | |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public Class |
| desc | back to summary |
|---|---|
public String desc()
| |
| traitClass | back to summary |
|---|---|
public Class
| |