Package io.microsphere.reflect
Enum Modifier
- java.lang.Object
-
- java.lang.Enum<Modifier>
-
- io.microsphere.reflect.Modifier
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ABSTRACT
Theabstract
modifier.ANNOTATION
BRIDGE
ENUM
FINAL
Thefinal
modifier.INTERFACE
Theinterface
modifier.MANDATED
NATIVE
Thenative
modifier.PRIVATE
Theprivate
modifier.PROTECTED
Theprotected
modifier.PUBLIC
Thepublic
modifier.STATIC
Thestatic
modifier.STRICT
Thestrictfp
modifier.SYNCHRONIZED
Thesynchronized
modifier.SYNTHETIC
TRANSIENT
Thetransient
modifier.VARARGS
VOLATILE
Thevolatile
modifier.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getValue()
The bit value of modifierstatic boolean
isAbstract(int modifiers)
Checks if the specified modifiers contain theabstract
modifier.static boolean
isAnnotation(int modifiers)
Checks if the specified modifiers contain theannotation
modifier.static boolean
isBridge(int modifiers)
Checks if the specified modifiers contain thebridge
modifier.static boolean
isEnum(int modifiers)
Checks if the specified modifiers contain theenum
modifier.static boolean
isFinal(int modifiers)
Checks if the specified modifiers contain thefinal
modifier.static boolean
isInterface(int modifiers)
Checks if the specified modifiers contain theinterface
modifier.static boolean
isMandated(int modifiers)
Checks if the specified modifiers contain themandated
modifier.static boolean
isNative(int modifiers)
Checks if the specified modifiers contain thenative
modifier.static boolean
isPrivate(int modifiers)
Checks if the specified modifiers contain theprivate
modifier.static boolean
isProtected(int modifiers)
Checks if the specified modifiers contain theprotected
modifier.static boolean
isPublic(int modifiers)
matches the specified modifiersstatic boolean
isStatic(int modifiers)
Checks if the specified modifiers contain thestatic
modifier.static boolean
isStrict(int modifiers)
Checks if the specified modifiers contain thestrict
modifier.static boolean
isSynchronized(int modifiers)
Checks if the specified modifiers contain thesynchronized
modifier.static boolean
isSynthetic(int modifiers)
Checks if the specified modifiers contain thesynthetic
modifier.static boolean
isTransient(int modifiers)
Checks if the specified modifiers contain thetransient
modifier.static boolean
isVarArgs(int modifiers)
Checks if the specified modifiers contain thevarargs
modifier.static boolean
isVolatile(int modifiers)
Checks if the specified modifiers contain thevolatile
modifier.boolean
matches(int mod)
matches the specified modifierstatic Modifier
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Modifier[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PUBLIC
public static final Modifier PUBLIC
Thepublic
modifier.
-
PRIVATE
public static final Modifier PRIVATE
Theprivate
modifier.
-
PROTECTED
public static final Modifier PROTECTED
Theprotected
modifier.
-
STATIC
public static final Modifier STATIC
Thestatic
modifier.
-
FINAL
public static final Modifier FINAL
Thefinal
modifier.
-
SYNCHRONIZED
public static final Modifier SYNCHRONIZED
Thesynchronized
modifier.
-
VOLATILE
public static final Modifier VOLATILE
Thevolatile
modifier.
-
TRANSIENT
public static final Modifier TRANSIENT
Thetransient
modifier.
-
NATIVE
public static final Modifier NATIVE
Thenative
modifier.
-
INTERFACE
public static final Modifier INTERFACE
Theinterface
modifier.
-
ABSTRACT
public static final Modifier ABSTRACT
Theabstract
modifier.
-
STRICT
public static final Modifier STRICT
Thestrictfp
modifier.
-
BRIDGE
public static final Modifier BRIDGE
-
VARARGS
public static final Modifier VARARGS
-
SYNTHETIC
public static final Modifier SYNTHETIC
-
ANNOTATION
public static final Modifier ANNOTATION
-
ENUM
public static final Modifier ENUM
-
MANDATED
public static final Modifier MANDATED
-
-
Method Detail
-
values
public static Modifier[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Modifier c : Modifier.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Modifier valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getValue
public int getValue()
The bit value of modifier- Returns:
- the bit value of modifier
-
matches
public boolean matches(int mod)
matches the specified modifier- Parameters:
mod
- the bit of modifier- Returns:
true
if matches, otherwisefalse
-
isPublic
public static boolean isPublic(int modifiers)
matches the specified modifiers- Parameters:
modifiers
- the modifier- Returns:
true
if matches, otherwisefalse
-
isPrivate
public static boolean isPrivate(int modifiers)
Checks if the specified modifiers contain theprivate
modifier.- Parameters:
modifiers
- the bit mask of modifiers to check- Returns:
true
if theprivate
modifier is present, otherwisefalse
- See Also:
Modifier.PRIVATE
,PRIVATE
-
isProtected
public static boolean isProtected(int modifiers)
Checks if the specified modifiers contain theprotected
modifier.- Parameters:
modifiers
- the bit mask of modifiers to check- Returns:
true
if theprotected
modifier is present, otherwisefalse
- See Also:
Modifier.PROTECTED
,PROTECTED
-
isStatic
public static boolean isStatic(int modifiers)
Checks if the specified modifiers contain thestatic
modifier.- Parameters:
modifiers
- the bit mask of modifiers to check- Returns:
true
if thestatic
modifier is present, otherwisefalse
- See Also:
Modifier.STATIC
,STATIC
-
isFinal
public static boolean isFinal(int modifiers)
Checks if the specified modifiers contain thefinal
modifier.- Parameters:
modifiers
- the bit mask of modifiers to check- Returns:
true
if thefinal
modifier is present, otherwisefalse
- See Also:
Modifier.FINAL
,FINAL
-
isSynchronized
public static boolean isSynchronized(int modifiers)
Checks if the specified modifiers contain thesynchronized
modifier.- Parameters:
modifiers
- the bit mask of modifiers to check- Returns:
true
if thesynchronized
modifier is present, otherwisefalse
- See Also:
Modifier.SYNCHRONIZED
,SYNCHRONIZED
-
isVolatile
public static boolean isVolatile(int modifiers)
Checks if the specified modifiers contain thevolatile
modifier.- Parameters:
modifiers
- the bit mask of modifiers to check- Returns:
true
if thevolatile
modifier is present, otherwisefalse
- See Also:
Modifier.VOLATILE
,VOLATILE
-
isTransient
public static boolean isTransient(int modifiers)
Checks if the specified modifiers contain thetransient
modifier.- Parameters:
modifiers
- the bit mask of modifiers to check- Returns:
true
if thetransient
modifier is present, otherwisefalse
- See Also:
Modifier.TRANSIENT
,TRANSIENT
-
isNative
public static boolean isNative(int modifiers)
Checks if the specified modifiers contain thenative
modifier.- Parameters:
modifiers
- the bit mask of modifiers to check- Returns:
true
if thenative
modifier is present, otherwisefalse
- See Also:
Modifier.NATIVE
,NATIVE
-
isInterface
public static boolean isInterface(int modifiers)
Checks if the specified modifiers contain theinterface
modifier.- Parameters:
modifiers
- the bit mask of modifiers to check- Returns:
true
if theinterface
modifier is present, otherwisefalse
- See Also:
Modifier.INTERFACE
,INTERFACE
-
isAbstract
public static boolean isAbstract(int modifiers)
Checks if the specified modifiers contain theabstract
modifier.- Parameters:
modifiers
- the bit mask of modifiers to check- Returns:
true
if theabstract
modifier is present, otherwisefalse
- See Also:
Modifier.ABSTRACT
,ABSTRACT
-
isStrict
public static boolean isStrict(int modifiers)
Checks if the specified modifiers contain thestrict
modifier.- Parameters:
modifiers
- the bit mask of modifiers to check- Returns:
true
if thestrict
modifier is present, otherwisefalse
- See Also:
Modifier.STRICT
,STRICT
-
isBridge
public static boolean isBridge(int modifiers)
Checks if the specified modifiers contain thebridge
modifier.- Parameters:
modifiers
- the bit mask of modifiers to check- Returns:
true
if thebridge
modifier is present, otherwisefalse
- See Also:
java.lang.reflect.Modifier#BRIDGE
,BRIDGE
-
isVarArgs
public static boolean isVarArgs(int modifiers)
Checks if the specified modifiers contain thevarargs
modifier.- Parameters:
modifiers
- the bit mask of modifiers to check- Returns:
true
if thevarargs
modifier is present, otherwisefalse
- See Also:
java.lang.reflect.Modifier#VARARGS
,VARARGS
-
isSynthetic
public static boolean isSynthetic(int modifiers)
Checks if the specified modifiers contain thesynthetic
modifier.- Parameters:
modifiers
- the bit mask of modifiers to check- Returns:
true
if thesynthetic
modifier is present, otherwisefalse
- See Also:
java.lang.reflect.Modifier#SYNTHETIC
,SYNTHETIC
-
isAnnotation
public static boolean isAnnotation(int modifiers)
Checks if the specified modifiers contain theannotation
modifier.- Parameters:
modifiers
- the bit mask of modifiers to check- Returns:
true
if theannotation
modifier is present, otherwisefalse
- See Also:
java.lang.reflect.Modifier#ANNOTATION
,ANNOTATION
-
isEnum
public static boolean isEnum(int modifiers)
Checks if the specified modifiers contain theenum
modifier.- Parameters:
modifiers
- the bit mask of modifiers to check- Returns:
true
if theenum
modifier is present, otherwisefalse
- See Also:
java.lang.reflect.Modifier#ENUM
,ENUM
-
isMandated
public static boolean isMandated(int modifiers)
Checks if the specified modifiers contain themandated
modifier.- Parameters:
modifiers
- the bit mask of modifiers to check- Returns:
true
if themandated
modifier is present, otherwisefalse
- See Also:
java.lang.reflect.Modifier#MANDATED
,MANDATED
-
-