|
Jalopy 1.0b10 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | 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(AST modifiers)
Indicates whether the given modifiers node contains the abstract keyword. |
static boolean |
isFinal(AST modifiers)
Indicates whether the given modifiers node contains the final keyword. |
static boolean |
isFriendly(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(AST modifiers)
Indicates whether the given modifiers node contains the private keyword. |
static boolean |
isProtected(AST modifiers)
Indicates whether the given modifiers node contains the protected keyword. |
static boolean |
isPublic(AST modifiers)
Indicates whether the given modifiers node contains the public keyword. |
static boolean |
isStatic(AST modifiers)
Indicates whether the given modifiers node contains the static keyword. |
static boolean |
isSynchronized(AST modifiers)
Indicates whether the given modifiers node contains the synchronized keyword. |
static int |
valueOf(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(AST modifiers)
modifiers
- MODIFIERS node to check.true
if the given node contains the abstract
keyword.public static boolean isFinal(AST modifiers)
modifiers
- MODIFIERS node to check.true
if the given node contains the final keyword.public static boolean isFriendly(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(AST modifiers)
modifiers
- MODIFIERS node to check.true
if the given node contains the private keyword.public static boolean isProtected(AST modifiers)
modifiers
- MODIFIERS node to check.true
if the given node contains the protected
keyword.public static boolean isPublic(AST modifiers)
modifiers
- MODIFIERS node to check.true
if the given node contains the public keyword.public static boolean isStatic(AST modifiers)
modifiers
- MODIFIERS node to check.true
if the given node contains the static keyword.public static boolean isSynchronized(AST modifiers)
modifiers
- MODIFIERS node to check.true
if the given node contains the synchronized
keyword.public static int valueOf(AST modifiers)
modifiers
- MODIFIERS node or one of the valid nodes representing modifiers
(e.g. LITERAL_public, LITERAL_synchronized etc.).IllegalArgumentException
- if modifiers == null
or
modifiers.getType() != JavaTokenTypes.MODIFIERS
|
Jalopy 1.0b10 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |