Package org.jboss.jdeparser
Class JMod
java.lang.Object
org.jboss.jdeparser.JMod
The set of modifiers for types and members.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intTheabstractmodifier.static final intThedefaultmodifier found in Java 8 and later.static final intThefinalmodifier.(package private) static final intstatic final intThenativemodifier.static final intTheprivatemodifier.(package private) static final intstatic final intTheprotectedmodifier.static final intThepublicmodifier.static final intThestaticmodifier.static final intThestrictfpmodifier.static final intThesynchronizedmodifier.static final intThetransientmodifier.(package private) static final intstatic final intThevolatilemodifier. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 intReturns 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 Details
-
ABSTRACT
public static final int ABSTRACTTheabstractmodifier.- See Also:
-
FINAL
public static final int FINALThefinalmodifier.- See Also:
-
NATIVE
public static final int NATIVEThenativemodifier.- See Also:
-
PRIVATE
public static final int PRIVATETheprivatemodifier.- See Also:
-
PROTECTED
public static final int PROTECTEDTheprotectedmodifier.- See Also:
-
PUBLIC
public static final int PUBLICThepublicmodifier.- See Also:
-
STATIC
public static final int STATICThestaticmodifier.- See Also:
-
STRICTFP
public static final int STRICTFPThestrictfpmodifier.- See Also:
-
SYNCHRONIZED
public static final int SYNCHRONIZEDThesynchronizedmodifier.- See Also:
-
TRANSIENT
public static final int TRANSIENTThetransientmodifier.- See Also:
-
VOLATILE
public static final int VOLATILEThevolatilemodifier.- See Also:
-
DEFAULT
public static final int DEFAULTThedefaultmodifier found in Java 8 and later.- See Also:
-
PRIVATE_BITS
static final int PRIVATE_BITS- See Also:
-
INNER
static final int INNER- See Also:
-
VARARGS
static final int VARARGS- See Also:
-
-
Constructor Details
-
JMod
public JMod()
-
-
Method Details
-
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
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
- Throws:
IOException
-