|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.reflect.Modifier | +--de.hunsicker.jalopy.language.JavaNodeModifier
Helper class which resolves the different modifiers of a MODIFIERS node.
This class can be used to get the access level of a class, method, field...
Field Summary | |
static int |
UNKNOWN
Unknown keyword. |
Fields inherited from class java.lang.reflect.Modifier |
ABSTRACT, FINAL, INTERFACE, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SYNCHRONIZED, TRANSIENT, VOLATILE |
Method Summary | |
static boolean |
isAbstract(antlr.collections.AST modifiers)
Indicates whether the given modifiers node contains the abstract keyword. |
static boolean |
isFinal(antlr.collections.AST modifiers)
Indicates whether the given modifiers node contains the final keyword. |
static boolean |
isFriendly(antlr.collections.AST modifiers)
Indicates whether the given modifiers node denotes package protected (friendly) access. |
static boolean |
isFriendly(int modifiers)
Indicates whether the given modifier denotes package protected (friendly) access. |
static boolean |
isPrivate(antlr.collections.AST modifiers)
Indicates whether the given modifiers node contains the private keyword. |
static boolean |
isProtected(antlr.collections.AST modifiers)
Indicates whether the given modifiers node contains the protected keyword. |
static boolean |
isPublic(antlr.collections.AST modifiers)
Indicates whether the given modifiers node contains the public keyword. |
static boolean |
isStatic(antlr.collections.AST modifiers)
Indicates whether the given modifiers node contains the static keyword. |
static boolean |
isSynchronized(antlr.collections.AST modifiers)
Indicates whether the given modifiers node contains the synchronized keyword. |
static int |
valueOf(antlr.collections.AST modifiers)
Returns the modifier mask of the given modifiers node. |
Methods inherited from class java.lang.reflect.Modifier |
isAbstract, isFinal, isInterface, isNative, isPrivate, isProtected, isPublic, isStatic, isStrict, isSynchronized, isTransient, isVolatile, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int UNKNOWN
Method Detail |
public static boolean isAbstract(antlr.collections.AST modifiers)
modifiers
- MODIFIERS node to check.
true
if the given node contains the abstract
keyword.public static boolean isFinal(antlr.collections.AST modifiers)
modifiers
- MODIFIERS node to check.
true
if the given node contains the final keyword.public static boolean isFriendly(antlr.collections.AST modifiers)
modifiers
-
true
if the node denotes package protected access.public static boolean isFriendly(int modifiers)
modifiers
- MODIFIERS node to check.
true
if the node denotes package protected access.public static boolean isPrivate(antlr.collections.AST modifiers)
modifiers
- MODIFIERS node to check.
true
if the given node contains the private keyword.public static boolean isProtected(antlr.collections.AST modifiers)
modifiers
- MODIFIERS node to check.
true
if the given node contains the protected
keyword.public static boolean isPublic(antlr.collections.AST modifiers)
modifiers
- MODIFIERS node to check.
true
if the given node contains the public keyword.public static boolean isStatic(antlr.collections.AST modifiers)
modifiers
- MODIFIERS node to check.
true
if the given node contains the static keyword.public static boolean isSynchronized(antlr.collections.AST modifiers)
modifiers
- MODIFIERS node to check.
true
if the given node contains the synchronized
keyword.public static int valueOf(antlr.collections.AST modifiers)
modifiers
- MODIFIERS node or one of the valid nodes representing modifiers
(e.g. LITERAL_public, LITERAL_synchronized etc.).
java.lang.IllegalArgumentException
- if modifiers == null
or
modifiers.getType() != JavaTokenTypes.MODIFIERS
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |