|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.clazz.ClazzModifiers
public class ClazzModifiers
ClazzModifiers
defines the modifiers in a manipulable way.
Field Summary | |
---|---|
static int |
ABSTRACT
The int value representing the abstract
modifier. |
static int |
FINAL
The int value representing the final
modifier. |
static int |
INTERFACE
The int value representing the interface
modifier. |
static int |
NATIVE
The int value representing the native
modifier. |
static int |
PRIVATE
The int value representing the private
modifier. |
static int |
PROTECTED
The int value representing the protected
modifier. |
static int |
PUBLIC
The int value representing the public
modifier. |
static int |
STATIC
The int value representing the static
modifier. |
static int |
STRICT
The int value representing the strictfp
modifier. |
static int |
SYNCHRONIZED
The int value representing the synchronized
modifier. |
static int |
TRANSIENT
The int value representing the transient
modifier. |
static int |
VOLATILE
The int value representing the volatile
modifier. |
Constructor Summary | |
---|---|
ClazzModifiers(ClazzModifiers modifiers)
Copy constructor. |
|
ClazzModifiers(int modifiers)
Constructor. |
Method Summary | |
---|---|
int |
getFlags()
Gets the modifier flags, which can be accessed via java.lang.reflect. |
boolean |
isAbstract()
Is the object abstract. |
boolean |
isFinal()
Is the object final. |
boolean |
isNative()
Is the object native. |
boolean |
isPackageScope()
Is the object package scope. |
boolean |
isPrivateScope()
Is the object private scope. |
boolean |
isProtectedScope()
Is the object protected scope. |
boolean |
isPublicScope()
Is the object public scope. |
boolean |
isStatic()
Is the object static. |
boolean |
isStrictFP()
Is the object strictfp. |
boolean |
isSynchronized()
Is the object synchronized. |
boolean |
isTransient()
Is the object transient. |
boolean |
isVolatile()
Is the object volatile. |
void |
setAbstract(boolean state)
Set the object to be abstract. |
void |
setFinal(boolean state)
Set the object to be final. |
void |
setFlags(int modifiers)
Sets the modifier flags. |
void |
setNative(boolean state)
Set the object to be native. |
void |
setPackageScope()
Set the object to be package scope. |
void |
setPrivateScope()
Set the object to be private scope. |
void |
setProtectedScope()
Set the object to be protected scope. |
void |
setPublicScope()
Set the object to be public scope. |
void |
setStatic(boolean state)
Set the object to be static. |
void |
setStrictFP(boolean state)
Set the object to be strictfp. |
void |
setSynchronized(boolean state)
Set the object to be synchronized. |
void |
setTransient(boolean state)
Set the object to be transient. |
void |
setVolatile(boolean state)
Set the object to be volatile. |
String |
toString()
Geta string describing the access modifier flags in the specified modifier. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int PUBLIC
int
value representing the public
modifier.
public static final int PRIVATE
int
value representing the private
modifier.
public static final int PROTECTED
int
value representing the protected
modifier.
public static final int STATIC
int
value representing the static
modifier.
public static final int FINAL
int
value representing the final
modifier.
public static final int SYNCHRONIZED
int
value representing the synchronized
modifier.
public static final int VOLATILE
int
value representing the volatile
modifier.
public static final int TRANSIENT
int
value representing the transient
modifier.
public static final int NATIVE
int
value representing the native
modifier.
public static final int INTERFACE
int
value representing the interface
modifier.
public static final int ABSTRACT
int
value representing the abstract
modifier.
public static final int STRICT
int
value representing the strictfp
modifier.
Constructor Detail |
---|
public ClazzModifiers(int modifiers)
modifiers
- the modifierspublic ClazzModifiers(ClazzModifiers modifiers)
modifiers
- the modifiers object
IllegalArgumentException
- if the modifiers object is nullMethod Detail |
---|
public int getFlags()
public void setFlags(int modifiers)
modifiers
- the modifier flags to update topublic boolean isPublicScope()
public void setPublicScope()
public boolean isProtectedScope()
public void setProtectedScope()
public boolean isPackageScope()
public void setPackageScope()
public boolean isPrivateScope()
public void setPrivateScope()
public boolean isStatic()
public void setStatic(boolean state)
state
- true to make staticpublic boolean isFinal()
public void setFinal(boolean state)
state
- true to make finalpublic boolean isSynchronized()
public void setSynchronized(boolean state)
state
- true to make synchronizedpublic boolean isVolatile()
public void setVolatile(boolean state)
state
- true to make volatilepublic boolean isTransient()
public void setTransient(boolean state)
state
- true to make transientpublic boolean isNative()
public void setNative(boolean state)
state
- true to make nativepublic boolean isAbstract()
public void setAbstract(boolean state)
state
- true to make abstractpublic boolean isStrictFP()
public void setStrictFP(boolean state)
state
- true to make strictfppublic String toString()
The modifier names are return in canonical order, as specified by The Java Language Specification.AModifiers[public final synchronized] AModifiers[private transient volatile]
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |