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 int
Theabstract
modifier.static final int
Thedefault
modifier found in Java 8 and later.static final int
Thefinal
modifier.(package private) static final int
static final int
Thenative
modifier.static final int
Theprivate
modifier.(package private) static final int
static final int
Theprotected
modifier.static final int
Thepublic
modifier.static final int
Thestatic
modifier.static final int
Thestrictfp
modifier.static final int
Thesynchronized
modifier.static final int
Thetransient
modifier.(package private) static final int
static final int
Thevolatile
modifier. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
allAreClear
(int set, int test) Test to see if all modifiers in the given set are absent in the test value.static boolean
allAreSet
(int set, int test) Test to see if all modifiers in the given set are present in the test value.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.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.static int
Returns an integer which results in the appropriate modifier based on the element.static boolean
oneIsSet
(int set, int test) Test to see if exactly one modifier of the given set is present in the test value.(package private) static void
write
(SourceFileWriter writer, int mods)
-
Field Details
-
ABSTRACT
public static final int ABSTRACTTheabstract
modifier.- See Also:
-
FINAL
public static final int FINALThefinal
modifier.- See Also:
-
NATIVE
public static final int NATIVEThenative
modifier.- See Also:
-
PRIVATE
public static final int PRIVATETheprivate
modifier.- See Also:
-
PROTECTED
public static final int PROTECTEDTheprotected
modifier.- See Also:
-
PUBLIC
public static final int PUBLICThepublic
modifier.- See Also:
-
STATIC
public static final int STATICThestatic
modifier.- See Also:
-
STRICTFP
public static final int STRICTFPThestrictfp
modifier.- See Also:
-
SYNCHRONIZED
public static final int SYNCHRONIZEDThesynchronized
modifier.- See Also:
-
TRANSIENT
public static final int TRANSIENTThetransient
modifier.- See Also:
-
VOLATILE
public static final int VOLATILEThevolatile
modifier.- See Also:
-
DEFAULT
public static final int DEFAULTThedefault
modifier 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:
true
if exactly one ofset
is present intest
,false
otherwise
-
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:
true
if all the modifiers inset
are present intest
,false
otherwise
-
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:
true
if all the modifiers inset
are absent intest
,false
otherwise
-
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:
true
if any of the modifiers inset
are present intest
,false
otherwise
-
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:
true
if any of the modifiers inset
are absent intest
,false
otherwise
-
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
-