org.codehaus.janino
Class Java.Modifiers
java.lang.Object
org.codehaus.janino.Java.Modifiers
- Enclosing class:
- Java
public static class Java.Modifiers
- extends Object
Representation of the modifier flags and annotations that are associated with a declaration.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
flags
public final short flags
- The or'ed constants declared in
Mod.
annotations
public final Java.Annotation[] annotations
- The annotations.
Java.Modifiers
public Java.Modifiers()
- A 'blank'
Java.Modifiers object: No flags, no annotations.
Java.Modifiers
public Java.Modifiers(short modifiers)
Java.Modifiers
public Java.Modifiers(short modifiers,
Java.Annotation[] annotations)
add
public Java.Modifiers add(int modifiersToAdd)
- Returns:
- This object, with the given
modifiersToAdd added.
remove
public Java.Modifiers remove(int modifiersToRemove)
- Returns:
- This object, with the given
modifiersToRemove removed.
changeAccess
public Java.Modifiers changeAccess(int newAccess)
- Parameters:
newAccess - One of Mod.PUBLIC, Mod.PRIVATE, Mod.PROTECTED, Mod.PACKAGE
- Returns:
- This object, with the access changed to
newAccess