java.lang.Object | |
↳ | java.lang.reflect.Modifier |
Known Direct Subclasses |
The Modifier class provides static
methods and
constants to decode class and member access modifiers. The sets of
modifiers are represented as integers with distinct bit positions
representing different modifiers. The values for the constants
representing the modifiers are taken from The
JavaTM Virtual Machine Specification, Second
edition tables
4.1,
4.4,
4.5, and
4.7.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | ABSTRACT | The int value representing the abstract
modifier. |
|||||||||
int | FINAL | The int value representing the final
modifier. |
|||||||||
int | INTERFACE | The int value representing the interface
modifier. |
|||||||||
int | NATIVE | The int value representing the native
modifier. |
|||||||||
int | PRIVATE | The int value representing the private
modifier. |
|||||||||
int | PROTECTED | The int value representing the protected
modifier. |
|||||||||
int | PUBLIC | The int value representing the public
modifier. |
|||||||||
int | STATIC | The int value representing the static
modifier. |
|||||||||
int | STRICT | The int value representing the strictfp
modifier. |
|||||||||
int | SYNCHRONIZED | The int value representing the synchronized
modifier. |
|||||||||
int | TRANSIENT | The int value representing the transient
modifier. |
|||||||||
int | VOLATILE | The int value representing the volatile
modifier. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return
true if the integer argument includes the
abstract modifier, false otherwise. | |||||||||||
Return
true if the integer argument includes the
final modifier, false otherwise. | |||||||||||
Return
true if the integer argument includes the
interface modifier, false otherwise. | |||||||||||
Return
true if the integer argument includes the
native modifier, false otherwise. | |||||||||||
Return
true if the integer argument includes the
private modifier, false otherwise. | |||||||||||
Return
true if the integer argument includes the
protected modifier, false otherwise. | |||||||||||
Return
true if the integer argument includes the
public modifier, false otherwise. | |||||||||||
Return
true if the integer argument includes the
static modifier, false otherwise. | |||||||||||
Return
true if the integer argument includes the
strictfp modifier, false otherwise. | |||||||||||
Return
true if the integer argument includes the
synchronized modifier, false otherwise. | |||||||||||
Return
true if the integer argument includes the
transient modifier, false otherwise. | |||||||||||
Return
true if the integer argument includes the
volatile modifier, false otherwise. | |||||||||||
Return a string describing the access modifier flags in
the specified modifier.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The int
value representing the abstract
modifier.
The int
value representing the final
modifier.
The int
value representing the interface
modifier.
The int
value representing the native
modifier.
The int
value representing the private
modifier.
The int
value representing the protected
modifier.
The int
value representing the public
modifier.
The int
value representing the static
modifier.
The int
value representing the strictfp
modifier.
The int
value representing the synchronized
modifier.
The int
value representing the transient
modifier.
The int
value representing the volatile
modifier.
Return true
if the integer argument includes the
abstract
modifier, false
otherwise.
mod | a set of modifiers |
---|
true
if mod
includes the
abstract
modifier; false
otherwise.
Return true
if the integer argument includes the
final
modifier, false
otherwise.
mod | a set of modifiers |
---|
true
if mod
includes the
final
modifier; false
otherwise.
Return true
if the integer argument includes the
interface
modifier, false
otherwise.
mod | a set of modifiers |
---|
true
if mod
includes the
interface
modifier; false
otherwise.
Return true
if the integer argument includes the
native
modifier, false
otherwise.
mod | a set of modifiers |
---|
true
if mod
includes the
native
modifier; false
otherwise.
Return true
if the integer argument includes the
private
modifier, false
otherwise.
mod | a set of modifiers |
---|
true
if mod
includes the
private
modifier; false
otherwise.
Return true
if the integer argument includes the
protected
modifier, false
otherwise.
mod | a set of modifiers |
---|
true
if mod
includes the
protected
modifier; false
otherwise.
Return true
if the integer argument includes the
public
modifier, false
otherwise.
mod | a set of modifiers |
---|
true
if mod
includes the
public
modifier; false
otherwise.
Return true
if the integer argument includes the
static
modifier, false
otherwise.
mod | a set of modifiers |
---|
true
if mod
includes the
static
modifier; false
otherwise.
Return true
if the integer argument includes the
strictfp
modifier, false
otherwise.
mod | a set of modifiers |
---|
true
if mod
includes the
strictfp
modifier; false
otherwise.
Return true
if the integer argument includes the
synchronized
modifier, false
otherwise.
mod | a set of modifiers |
---|
true
if mod
includes the
synchronized
modifier; false
otherwise.
Return true
if the integer argument includes the
transient
modifier, false
otherwise.
mod | a set of modifiers |
---|
true
if mod
includes the
transient
modifier; false
otherwise.
Return true
if the integer argument includes the
volatile
modifier, false
otherwise.
mod | a set of modifiers |
---|
true
if mod
includes the
volatile
modifier; false
otherwise.
Return a string describing the access modifier flags in the specified modifier. For example:
The modifier names are returned in an order consistent with the suggested modifier orderings given in The Java Language Specification, Second Edition sections §8.1.1, §8.3.1, §8.4.3, §8.8.3, and §9.1.1. The full modifier ordering used by this method is:public final synchronized strictfp
public protected private abstract static final transient
volatile synchronized native strictfp
interface
The interface
modifier discussed in this class is
not a true modifier in the Java language and it appears after
all other modifiers listed by this method. This method may
return a string of modifiers that are not valid modifiers of a
Java entity; in other words, no checking is done on the
possible validity of the combination of modifiers represented
by the input.mod | a set of modifiers |
---|
mod