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 ABSTRACTTheabstractmodifier.ANNOTATIONBRIDGEENUMFINALThefinalmodifier.INTERFACETheinterfacemodifier.MANDATEDNATIVEThenativemodifier.PRIVATETheprivatemodifier.PROTECTEDTheprotectedmodifier.PUBLICThepublicmodifier.STATICThestaticmodifier.STRICTThestrictfpmodifier.SYNCHRONIZEDThesynchronizedmodifier.SYNTHETICTRANSIENTThetransientmodifier.VARARGSVOLATILEThevolatilemodifier.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetValue()The bit value of modifierstatic booleanisAbstract(int modifiers)Checks if the specified modifiers contain theabstractmodifier.static booleanisAnnotation(int modifiers)Checks if the specified modifiers contain theannotationmodifier.static booleanisBridge(int modifiers)Checks if the specified modifiers contain thebridgemodifier.static booleanisEnum(int modifiers)Checks if the specified modifiers contain theenummodifier.static booleanisFinal(int modifiers)Checks if the specified modifiers contain thefinalmodifier.static booleanisInterface(int modifiers)Checks if the specified modifiers contain theinterfacemodifier.static booleanisMandated(int modifiers)Checks if the specified modifiers contain themandatedmodifier.static booleanisNative(int modifiers)Checks if the specified modifiers contain thenativemodifier.static booleanisPrivate(int modifiers)Checks if the specified modifiers contain theprivatemodifier.static booleanisProtected(int modifiers)Checks if the specified modifiers contain theprotectedmodifier.static booleanisPublic(int modifiers)matches the specified modifiersstatic booleanisStatic(int modifiers)Checks if the specified modifiers contain thestaticmodifier.static booleanisStrict(int modifiers)Checks if the specified modifiers contain thestrictmodifier.static booleanisSynchronized(int modifiers)Checks if the specified modifiers contain thesynchronizedmodifier.static booleanisSynthetic(int modifiers)Checks if the specified modifiers contain thesyntheticmodifier.static booleanisTransient(int modifiers)Checks if the specified modifiers contain thetransientmodifier.static booleanisVarArgs(int modifiers)Checks if the specified modifiers contain thevarargsmodifier.static booleanisVolatile(int modifiers)Checks if the specified modifiers contain thevolatilemodifier.booleanmatches(int mod)matches the specified modifierstatic ModifiervalueOf(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
Thepublicmodifier.
-
PRIVATE
public static final Modifier PRIVATE
Theprivatemodifier.
-
PROTECTED
public static final Modifier PROTECTED
Theprotectedmodifier.
-
STATIC
public static final Modifier STATIC
Thestaticmodifier.
-
FINAL
public static final Modifier FINAL
Thefinalmodifier.
-
SYNCHRONIZED
public static final Modifier SYNCHRONIZED
Thesynchronizedmodifier.
-
VOLATILE
public static final Modifier VOLATILE
Thevolatilemodifier.
-
TRANSIENT
public static final Modifier TRANSIENT
Thetransientmodifier.
-
NATIVE
public static final Modifier NATIVE
Thenativemodifier.
-
INTERFACE
public static final Modifier INTERFACE
Theinterfacemodifier.
-
ABSTRACT
public static final Modifier ABSTRACT
Theabstractmodifier.
-
STRICT
public static final Modifier STRICT
Thestrictfpmodifier.
-
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:
trueif matches, otherwisefalse
-
isPublic
public static boolean isPublic(int modifiers)
matches the specified modifiers- Parameters:
modifiers- the modifier- Returns:
trueif matches, otherwisefalse
-
isPrivate
public static boolean isPrivate(int modifiers)
Checks if the specified modifiers contain theprivatemodifier.- Parameters:
modifiers- the bit mask of modifiers to check- Returns:
trueif theprivatemodifier is present, otherwisefalse- See Also:
Modifier.PRIVATE,PRIVATE
-
isProtected
public static boolean isProtected(int modifiers)
Checks if the specified modifiers contain theprotectedmodifier.- Parameters:
modifiers- the bit mask of modifiers to check- Returns:
trueif theprotectedmodifier is present, otherwisefalse- See Also:
Modifier.PROTECTED,PROTECTED
-
isStatic
public static boolean isStatic(int modifiers)
Checks if the specified modifiers contain thestaticmodifier.- Parameters:
modifiers- the bit mask of modifiers to check- Returns:
trueif thestaticmodifier is present, otherwisefalse- See Also:
Modifier.STATIC,STATIC
-
isFinal
public static boolean isFinal(int modifiers)
Checks if the specified modifiers contain thefinalmodifier.- Parameters:
modifiers- the bit mask of modifiers to check- Returns:
trueif thefinalmodifier is present, otherwisefalse- See Also:
Modifier.FINAL,FINAL
-
isSynchronized
public static boolean isSynchronized(int modifiers)
Checks if the specified modifiers contain thesynchronizedmodifier.- Parameters:
modifiers- the bit mask of modifiers to check- Returns:
trueif thesynchronizedmodifier is present, otherwisefalse- See Also:
Modifier.SYNCHRONIZED,SYNCHRONIZED
-
isVolatile
public static boolean isVolatile(int modifiers)
Checks if the specified modifiers contain thevolatilemodifier.- Parameters:
modifiers- the bit mask of modifiers to check- Returns:
trueif thevolatilemodifier is present, otherwisefalse- See Also:
Modifier.VOLATILE,VOLATILE
-
isTransient
public static boolean isTransient(int modifiers)
Checks if the specified modifiers contain thetransientmodifier.- Parameters:
modifiers- the bit mask of modifiers to check- Returns:
trueif thetransientmodifier is present, otherwisefalse- See Also:
Modifier.TRANSIENT,TRANSIENT
-
isNative
public static boolean isNative(int modifiers)
Checks if the specified modifiers contain thenativemodifier.- Parameters:
modifiers- the bit mask of modifiers to check- Returns:
trueif thenativemodifier is present, otherwisefalse- See Also:
Modifier.NATIVE,NATIVE
-
isInterface
public static boolean isInterface(int modifiers)
Checks if the specified modifiers contain theinterfacemodifier.- Parameters:
modifiers- the bit mask of modifiers to check- Returns:
trueif theinterfacemodifier is present, otherwisefalse- See Also:
Modifier.INTERFACE,INTERFACE
-
isAbstract
public static boolean isAbstract(int modifiers)
Checks if the specified modifiers contain theabstractmodifier.- Parameters:
modifiers- the bit mask of modifiers to check- Returns:
trueif theabstractmodifier is present, otherwisefalse- See Also:
Modifier.ABSTRACT,ABSTRACT
-
isStrict
public static boolean isStrict(int modifiers)
Checks if the specified modifiers contain thestrictmodifier.- Parameters:
modifiers- the bit mask of modifiers to check- Returns:
trueif thestrictmodifier is present, otherwisefalse- See Also:
Modifier.STRICT,STRICT
-
isBridge
public static boolean isBridge(int modifiers)
Checks if the specified modifiers contain thebridgemodifier.- Parameters:
modifiers- the bit mask of modifiers to check- Returns:
trueif thebridgemodifier is present, otherwisefalse- See Also:
java.lang.reflect.Modifier#BRIDGE,BRIDGE
-
isVarArgs
public static boolean isVarArgs(int modifiers)
Checks if the specified modifiers contain thevarargsmodifier.- Parameters:
modifiers- the bit mask of modifiers to check- Returns:
trueif thevarargsmodifier is present, otherwisefalse- See Also:
java.lang.reflect.Modifier#VARARGS,VARARGS
-
isSynthetic
public static boolean isSynthetic(int modifiers)
Checks if the specified modifiers contain thesyntheticmodifier.- Parameters:
modifiers- the bit mask of modifiers to check- Returns:
trueif thesyntheticmodifier is present, otherwisefalse- See Also:
java.lang.reflect.Modifier#SYNTHETIC,SYNTHETIC
-
isAnnotation
public static boolean isAnnotation(int modifiers)
Checks if the specified modifiers contain theannotationmodifier.- Parameters:
modifiers- the bit mask of modifiers to check- Returns:
trueif theannotationmodifier is present, otherwisefalse- See Also:
java.lang.reflect.Modifier#ANNOTATION,ANNOTATION
-
isEnum
public static boolean isEnum(int modifiers)
Checks if the specified modifiers contain theenummodifier.- Parameters:
modifiers- the bit mask of modifiers to check- Returns:
trueif theenummodifier is present, otherwisefalse- See Also:
java.lang.reflect.Modifier#ENUM,ENUM
-
isMandated
public static boolean isMandated(int modifiers)
Checks if the specified modifiers contain themandatedmodifier.- Parameters:
modifiers- the bit mask of modifiers to check- Returns:
trueif themandatedmodifier is present, otherwisefalse- See Also:
java.lang.reflect.Modifier#MANDATED,MANDATED
-
-