Package org.jboss.jdeparser
Class JMod
- java.lang.Object
-
- org.jboss.jdeparser.JMod
-
public final class JMod extends java.lang.ObjectThe set of modifiers for types and members.
-
-
Field Summary
Fields Modifier and Type Field Description static intABSTRACTTheabstractmodifier.static intDEFAULTThedefaultmodifier found in Java 8 and later.static intFINALThefinalmodifier.(package private) static intINNERstatic intNATIVEThenativemodifier.static intPRIVATETheprivatemodifier.(package private) static intPRIVATE_BITSstatic intPROTECTEDTheprotectedmodifier.static intPUBLICThepublicmodifier.static intSTATICThestaticmodifier.static intSTRICTFPThestrictfpmodifier.static intSYNCHRONIZEDThesynchronizedmodifier.static intTRANSIENTThetransientmodifier.(package private) static intVARARGSstatic intVOLATILEThevolatilemodifier.
-
Constructor Summary
Constructors Constructor Description JMod()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanallAreClear(int set, int test)Test to see if all modifiers in the given set are absent in the test value.static booleanallAreSet(int set, int test)Test to see if all modifiers in the given set are present in the test value.static booleananyAreClear(int set, int test)Test to see if any of the modifiers in the given set are absent in the test value.static booleananyAreSet(int set, int test)Test to see if any of the modifiers in the given set are present in the test value.static intof(javax.lang.model.element.Element element)Returns an integer which results in the appropriate modifier based on the element.static booleanoneIsSet(int set, int test)Test to see if exactly one modifier of the given set is present in the test value.(package private) static voidwrite(SourceFileWriter writer, int mods)
-
-
-
Field Detail
-
ABSTRACT
public static final int ABSTRACT
Theabstractmodifier.- See Also:
- Constant Field Values
-
FINAL
public static final int FINAL
Thefinalmodifier.- See Also:
- Constant Field Values
-
NATIVE
public static final int NATIVE
Thenativemodifier.- See Also:
- Constant Field Values
-
PRIVATE
public static final int PRIVATE
Theprivatemodifier.- See Also:
- Constant Field Values
-
PROTECTED
public static final int PROTECTED
Theprotectedmodifier.- See Also:
- Constant Field Values
-
PUBLIC
public static final int PUBLIC
Thepublicmodifier.- See Also:
- Constant Field Values
-
STATIC
public static final int STATIC
Thestaticmodifier.- See Also:
- Constant Field Values
-
STRICTFP
public static final int STRICTFP
Thestrictfpmodifier.- See Also:
- Constant Field Values
-
SYNCHRONIZED
public static final int SYNCHRONIZED
Thesynchronizedmodifier.- See Also:
- Constant Field Values
-
TRANSIENT
public static final int TRANSIENT
Thetransientmodifier.- See Also:
- Constant Field Values
-
VOLATILE
public static final int VOLATILE
Thevolatilemodifier.- See Also:
- Constant Field Values
-
DEFAULT
public static final int DEFAULT
Thedefaultmodifier found in Java 8 and later.- See Also:
- Constant Field Values
-
PRIVATE_BITS
static final int PRIVATE_BITS
- See Also:
- Constant Field Values
-
INNER
static final int INNER
- See Also:
- Constant Field Values
-
VARARGS
static final int VARARGS
- See Also:
- Constant Field Values
-
-
Method Detail
-
oneIsSet
public static boolean oneIsSet(int set, int test)Test to see if exactly one modifier of the given set is present in the test value.- Parameters:
set- the set of modifiers to test againsttest- the modifier set to test- Returns:
trueif exactly one ofsetis present intest,falseotherwise
-
allAreSet
public static boolean allAreSet(int set, int test)Test to see if all modifiers in the given set are present in the test value.- Parameters:
set- the set of modifiers to test againsttest- the modifier set to test- Returns:
trueif all the modifiers insetare present intest,falseotherwise
-
allAreClear
public static boolean allAreClear(int set, int test)Test to see if all modifiers in the given set are absent in the test value.- Parameters:
set- the set of modifiers to test againsttest- the modifier set to test- Returns:
trueif all the modifiers insetare absent intest,falseotherwise
-
anyAreSet
public static boolean anyAreSet(int set, int test)Test to see if any of the modifiers in the given set are present in the test value.- Parameters:
set- the set of modifiers to test againsttest- the modifier set to test- Returns:
trueif any of the modifiers insetare present intest,falseotherwise
-
anyAreClear
public static boolean anyAreClear(int set, int test)Test to see if any of the modifiers in the given set are absent in the test value.- Parameters:
set- the set of modifiers to test againsttest- the modifier set to test- Returns:
trueif any of the modifiers insetare absent intest,falseotherwise
-
of
public static int of(javax.lang.model.element.Element element)
Returns an integer which results in the appropriate modifier based on the element.- Parameters:
element- the element to check the modifiers on- Returns:
- an integer representing the modifiers
-
write
static void write(SourceFileWriter writer, int mods) throws java.io.IOException
- Throws:
java.io.IOException
-
-