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 tables in sections
4.1,
4.4,
4.5, and
4.7of
The Java Virtual Machine Specification.
Fields
static final int
The int
value representing the abstract
modifier.
static final int
The int
value representing the final
modifier.
static final int
The int
value representing the interface
modifier.
static final int
The int
value representing the native
modifier.
static final int
The int
value representing the private
modifier.
static final int
The int
value representing the protected
modifier.
static final int
The int
value representing the public
modifier.
static final int
The int
value representing the static
modifier.
static final int
The int
value representing the strictfp
modifier.
static final int
The int
value representing the synchronized
modifier.
static final int
The int
value representing the transient
modifier.
static final int
The int
value representing the volatile
modifier.
static int
Return an int
value OR-ing together the source language modifiers that can be applied to a class.
static int
Return an int
value OR-ing together the source language modifiers that can be applied to a constructor.
static int
Return an int
value OR-ing together the source language modifiers that can be applied to a field.
static int
Return an int
value OR-ing together the source language modifiers that can be applied to an interface.
static boolean
Return true
if the integer argument includes the abstract
modifier, false
otherwise.
static boolean
Return true
if the integer argument includes the final
modifier, false
otherwise.
static boolean
Return true
if the integer argument includes the interface
modifier, false
otherwise.
static boolean
Return true
if the integer argument includes the native
modifier, false
otherwise.
static boolean
Return true
if the integer argument includes the private
modifier, false
otherwise.
static boolean
Return true
if the integer argument includes the protected
modifier, false
otherwise.
static boolean
Return true
if the integer argument includes the public
modifier, false
otherwise.
static boolean
Return true
if the integer argument includes the static
modifier, false
otherwise.
static boolean
Return true
if the integer argument includes the strictfp
modifier, false
otherwise.
static boolean
Return true
if the integer argument includes the synchronized
modifier, false
otherwise.
static boolean
Return true
if the integer argument includes the transient
modifier, false
otherwise.
static boolean
Return true
if the integer argument includes the volatile
modifier, false
otherwise.
static int
Return an int
value OR-ing together the source language modifiers that can be applied to a method.
static int
Return an int
value OR-ing together the source language modifiers that can be applied to a parameter.
Return a string describing the access modifier flags in the specified modifier.
Methods declared in class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final int PUBLIC
The int
value representing the public
modifier.
public static final int PRIVATE
The int
value representing the private
modifier.
public static final int PROTECTED
The int
value representing the protected
modifier.
public static final int STATIC
The int
value representing the static
modifier.
public static final int FINAL
The int
value representing the final
modifier.
public static final int SYNCHRONIZED
The int
value representing the synchronized
modifier.
public static final int VOLATILE
The int
value representing the volatile
modifier.
public static final int TRANSIENT
The int
value representing the transient
modifier.
public static final int NATIVE
The int
value representing the native
modifier.
public static final int INTERFACE
The int
value representing the interface
modifier.
public static final int ABSTRACT
The int
value representing the abstract
modifier.
public static final int STRICT
The int
value representing the strictfp
modifier.
public static boolean isPublic(int mod)
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.
public static boolean isPrivate(int mod)
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.
public static boolean isProtected(int mod)
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.
public static boolean isStatic(int mod)
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.
public static boolean isFinal(int mod)
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.
public static boolean isSynchronized(int mod)
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.
public static boolean isVolatile(int mod)
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.
public static boolean isTransient(int mod)
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.
public static boolean isNative(int mod)
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.
public static boolean isInterface(int mod)
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.
public static boolean isAbstract(int mod)
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.
public static boolean isStrict(int mod)
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 a string describing the access modifier flags in the specified modifier. For example:
public final synchronized strictfp
The modifier names are returned in an order consistent with the suggested modifier orderings given in sections 8.1.1, 8.3.1, 8.4.3, 8.8.3, and 9.1.1 of
The Java Language Specification. The full modifier ordering used by this method is:
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. Note that to perform such checking for a known kind of entity, such as a constructor or method, first AND the argument of
toString
with the appropriate mask from a method like
constructorModifiers()
or
methodModifiers()
.
mod
- a set of modifiers
mod
public static int classModifiers()
Return an int
value OR-ing together the source language modifiers that can be applied to a class.
int
value OR-ing together the source language modifiers that can be applied to a class.
public static int interfaceModifiers()
Return an int
value OR-ing together the source language modifiers that can be applied to an interface.
int
value OR-ing together the source language modifiers that can be applied to an interface.
public static int constructorModifiers()
Return an int
value OR-ing together the source language modifiers that can be applied to a constructor.
int
value OR-ing together the source language modifiers that can be applied to a constructor.
public static int methodModifiers()
Return an int
value OR-ing together the source language modifiers that can be applied to a method.
int
value OR-ing together the source language modifiers that can be applied to a method.
public static int fieldModifiers()
Return an int
value OR-ing together the source language modifiers that can be applied to a field.
int
value OR-ing together the source language modifiers that can be applied to a field.
public static int parameterModifiers()
Return an int
value OR-ing together the source language modifiers that can be applied to a parameter.
int
value OR-ing together the source language modifiers that can be applied to a parameter.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4