public class Modifiers extends Object
Modifier and Type | Field and Description |
---|---|
static Modifiers |
NONE |
static Modifiers |
PRIVATE |
static Modifiers |
PROTECTED |
static Modifiers |
PUBLIC |
static Modifiers |
PUBLIC_ABSTRACT |
static Modifiers |
PUBLIC_STATIC |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
getBitmask()
Returns the bitmask.
|
static Modifiers |
getInstance(int bitmask)
Returns a Modifiers object with the given bitmask.
|
int |
hashCode() |
boolean |
isAbstract() |
boolean |
isBridge() |
boolean |
isEnum() |
boolean |
isFinal() |
boolean |
isInterface() |
boolean |
isNative() |
boolean |
isPrivate() |
boolean |
isProtected() |
boolean |
isPublic() |
boolean |
isStatic() |
boolean |
isStrict() |
boolean |
isSynchronized() |
boolean |
isTransient() |
boolean |
isVarArgs() |
boolean |
isVolatile() |
Modifiers |
toAbstract(boolean b)
When set abstract, the bitmask is cleared from being final, volatile,
transient, native, synchronized, and strictfp.
|
Modifiers |
toBridge(boolean b)
Used to identify if a method is a bridge method.
|
Modifiers |
toEnum(boolean b)
Used to identify if a field is an enum constant.
|
Modifiers |
toFinal(boolean b)
When set final, the bitmask is cleared from being an interface or
abstract.
|
Modifiers |
toInterface(boolean b)
When set as an interface, non-interface settings are cleared and the
bitmask is set abstract.
|
Modifiers |
toNative(boolean b)
When set native, non-native-method settings are cleared.
|
Modifiers |
toPrivate(boolean b)
When set private, the bitmask is cleared from being public or protected.
|
Modifiers |
toProtected(boolean b)
When set protected, the bitmask is cleared from being public or private.
|
Modifiers |
toPublic(boolean b)
When set public, the bitmask is cleared from being private or protected.
|
Modifiers |
toStatic(boolean b) |
Modifiers |
toStrict(boolean b) |
String |
toString()
Returns the string value generated by the Modifier class.
|
Modifiers |
toSynchronized(boolean b)
When set synchronized, non-method settings are cleared.
|
Modifiers |
toTransient(boolean b)
When set transient, non-field settings are cleared.
|
Modifiers |
toVarArgs(boolean b)
Used to identify if a method accepts a variable amount of
arguments.
|
Modifiers |
toVolatile(boolean b)
When set volatile, non-field settings are cleared.
|
public static final Modifiers NONE
public static final Modifiers PUBLIC
public static final Modifiers PUBLIC_ABSTRACT
public static final Modifiers PUBLIC_STATIC
public static final Modifiers PROTECTED
public static final Modifiers PRIVATE
public static Modifiers getInstance(int bitmask)
public final int getBitmask()
public boolean isPublic()
public boolean isPrivate()
public boolean isProtected()
public boolean isStatic()
public boolean isFinal()
public boolean isSynchronized()
public boolean isVolatile()
public boolean isTransient()
public boolean isNative()
public boolean isInterface()
public boolean isAbstract()
public boolean isStrict()
public boolean isBridge()
public boolean isEnum()
public boolean isVarArgs()
public Modifiers toPublic(boolean b)
b
- true to set public, false otherwisepublic Modifiers toPrivate(boolean b)
b
- true to set private, false otherwisepublic Modifiers toProtected(boolean b)
b
- true to set protected, false otherwisepublic Modifiers toStatic(boolean b)
b
- true to set static, false otherwisepublic Modifiers toFinal(boolean b)
b
- true to set final, false otherwisepublic Modifiers toSynchronized(boolean b)
b
- true to set synchronized, false otherwisepublic Modifiers toVolatile(boolean b)
b
- true to set volatile, false otherwisepublic Modifiers toTransient(boolean b)
b
- true to set transient, false otherwisepublic Modifiers toNative(boolean b)
b
- true to set native, false otherwisepublic Modifiers toInterface(boolean b)
b
- true to set interface, false otherwisepublic Modifiers toAbstract(boolean b)
b
- true to set abstract, false otherwisepublic Modifiers toStrict(boolean b)
b
- true to set strictfp, false otherwisepublic Modifiers toBridge(boolean b)
b
- true to set bridge, false otherwisepublic Modifiers toEnum(boolean b)
b
- true to set enum, false otherwisepublic Modifiers toVarArgs(boolean b)
b
- true to set varargs, false otherwisepublic String toString()
toString
in class Object
Object.toString()
Copyright © 2004-2015 Cojen. All Rights Reserved.