Package org.jboss.jdeparser
Class JMod
- java.lang.Object
-
- org.jboss.jdeparser.JMod
-
public final class JMod extends java.lang.Object
The set of modifiers for types and members.
-
-
Field Summary
Fields Modifier and Type Field Description static int
ABSTRACT
Theabstract
modifier.static int
DEFAULT
Thedefault
modifier found in Java 8 and later.static int
FINAL
Thefinal
modifier.(package private) static int
INNER
static int
NATIVE
Thenative
modifier.static int
PRIVATE
Theprivate
modifier.(package private) static int
PRIVATE_BITS
static int
PROTECTED
Theprotected
modifier.static int
PUBLIC
Thepublic
modifier.static int
STATIC
Thestatic
modifier.static int
STRICTFP
Thestrictfp
modifier.static int
SYNCHRONIZED
Thesynchronized
modifier.static int
TRANSIENT
Thetransient
modifier.(package private) static int
VARARGS
static int
VOLATILE
Thevolatile
modifier.
-
Constructor Summary
Constructors Constructor Description JMod()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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
of(javax.lang.model.element.Element element)
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 Detail
-
ABSTRACT
public static final int ABSTRACT
Theabstract
modifier.- See Also:
- Constant Field Values
-
FINAL
public static final int FINAL
Thefinal
modifier.- See Also:
- Constant Field Values
-
NATIVE
public static final int NATIVE
Thenative
modifier.- See Also:
- Constant Field Values
-
PRIVATE
public static final int PRIVATE
Theprivate
modifier.- See Also:
- Constant Field Values
-
PROTECTED
public static final int PROTECTED
Theprotected
modifier.- See Also:
- Constant Field Values
-
PUBLIC
public static final int PUBLIC
Thepublic
modifier.- See Also:
- Constant Field Values
-
STATIC
public static final int STATIC
Thestatic
modifier.- See Also:
- Constant Field Values
-
STRICTFP
public static final int STRICTFP
Thestrictfp
modifier.- See Also:
- Constant Field Values
-
SYNCHRONIZED
public static final int SYNCHRONIZED
Thesynchronized
modifier.- See Also:
- Constant Field Values
-
TRANSIENT
public static final int TRANSIENT
Thetransient
modifier.- See Also:
- Constant Field Values
-
VOLATILE
public static final int VOLATILE
Thevolatile
modifier.- See Also:
- Constant Field Values
-
DEFAULT
public static final int DEFAULT
Thedefault
modifier 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:
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
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
-
-