public abstract class Traits extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Traits.Implemented
Internal annotation used to indicate which methods in a trait interface have a
default implementation.
|
| Modifier and Type | Field and Description |
|---|---|
static ClassNode |
FORCEOVERRIDE_CLASSNODE |
static ClassNode |
IMPLEMENTED_CLASSNODE |
static Class |
TRAIT_CLASS |
static ClassNode |
TRAIT_CLASSNODE |
| Constructor and Description |
|---|
Traits() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
hasDefaultImplementation(MethodNode method)
Indicates whether a method in a trait interface has a default implementation.
|
static boolean |
isAnnotatedWithTrait(ClassNode cNode)
Returns true if the specified class node is annotated with the
Trait interface. |
static boolean |
isForceOverride(Method methodNode)
Returns true if the specified method is annotated with
ForceOverride |
static boolean |
isForceOverride(MethodNode methodNode)
Returns true if the specified method node is annotated with
ForceOverride |
static boolean |
isTrait(Class clazz)
Returns true if the specified class is a trait.
|
static boolean |
isTrait(ClassNode cNode)
Returns true if the specified class node is a trait.
|
public static final ClassNode FORCEOVERRIDE_CLASSNODE
public static final ClassNode IMPLEMENTED_CLASSNODE
public static final Class TRAIT_CLASS
public static final ClassNode TRAIT_CLASSNODE
public static boolean isTrait(ClassNode cNode)
cNode - a class node to testpublic static boolean isTrait(Class clazz)
clazz - a class to testpublic static boolean isAnnotatedWithTrait(ClassNode cNode)
Trait interface.cNode - a class nodeTrait interface.public static boolean isForceOverride(MethodNode methodNode)
ForceOverridemethodNode - a method nodeForceOverridepublic static boolean isForceOverride(Method methodNode)
ForceOverridemethodNode - a methodForceOverridepublic static boolean hasDefaultImplementation(MethodNode method)
method - a method node