public final class FacadeFlags
extends java.lang.Object
This class provides static methods only; it is not intended to be instantiated or subclassed by clients.
JNode.getFlags()
Modifier and Type | Field and Description |
---|---|
static int |
ABSTRACT
Abstract property flag.
|
static int |
ANNOTATION
Annotation property flag (added in J2SE 1.5).
|
static int |
BRIDGE
Bridge method property flag (added in J2SE 1.5).
|
static int |
DEFAULT
Constant representing the absence of any flag
|
static int |
DEPRECATED
Deprecated property flag.
|
static int |
ENUM
Enum property flag (added in J2SE 1.5).
|
static int |
FINAL
Final access flag.
|
static int |
INTERFACE
Interface property flag.
|
static int |
NATIVE
Native property flag.
|
static int |
PRIVATE
Private access flag.
|
static int |
PROTECTED
Protected access flag.
|
static int |
PUBLIC
Public access flag.
|
static int |
STATIC
Static access flag.
|
static int |
STRICTFP
Strictfp property flag.
|
static int |
SUPER
Super property flag.
|
static int |
SYNCHRONIZED
Synchronized access flag.
|
static int |
SYNTHETIC
Synthetic property flag.
|
static int |
TRANSIENT
Transient property flag.
|
static int |
VARARGS
Varargs method property flag (added in J2SE 1.5).
|
static int |
VOLATILE
Volatile property flag.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isAbstract(int flags)
Returns whether the given integer includes the
abstract modifier. |
static boolean |
isAnnotation(int flags)
Returns whether the given integer has the
AccAnnotation
bit set. |
static boolean |
isBridge(int flags)
Returns whether the given integer has the
AccBridge
bit set. |
static boolean |
isDeprecated(int flags)
Returns whether the given integer includes the indication that the
element is deprecated (
@deprecated tag in Javadoc comment). |
static boolean |
isEnum(int flags)
Returns whether the given integer has the
AccEnum
bit set. |
static boolean |
isFinal(int flags)
Returns whether the given integer includes the
final modifier. |
static boolean |
isInterface(int flags)
Returns whether the given integer includes the
interface modifier. |
static boolean |
isNative(int flags)
Returns whether the given integer includes the
native modifier. |
static boolean |
isPrivate(int flags)
Returns whether the given integer includes the
private modifier. |
static boolean |
isProtected(int flags)
Returns whether the given integer includes the
protected modifier. |
static boolean |
isPublic(int flags)
Returns whether the given integer includes the
public modifier. |
static boolean |
isStatic(int flags)
Returns whether the given integer includes the
static modifier. |
static boolean |
isStrictfp(int flags)
Returns whether the given integer includes the
strictfp modifier. |
static boolean |
isSynchronized(int flags)
Returns whether the given integer includes the
synchronized modifier. |
static boolean |
isSynthetic(int flags)
Returns whether the given integer includes the indication that the
element is synthetic.
|
static boolean |
isTransient(int flags)
Returns whether the given integer includes the
transient modifier. |
static boolean |
isVarargs(int flags)
Returns whether the given integer has the
AccVarargs
bit set. |
static boolean |
isVolatile(int flags)
Returns whether the given integer includes the
volatile modifier. |
static java.lang.String |
toString(int flags)
Returns a standard string describing the given modifier flags.
|
public static final int DEFAULT
public static final int PUBLIC
public static final int PRIVATE
public static final int PROTECTED
public static final int STATIC
public static final int FINAL
public static final int SYNCHRONIZED
public static final int VOLATILE
public static final int TRANSIENT
public static final int NATIVE
public static final int INTERFACE
public static final int ABSTRACT
public static final int STRICTFP
public static final int SUPER
public static final int SYNTHETIC
public static final int DEPRECATED
public static final int BRIDGE
public static final int VARARGS
public static final int ENUM
public static final int ANNOTATION
public static boolean isAbstract(int flags)
abstract
modifier.flags
- the flagstrue
if the abstract
modifier is includedpublic static boolean isDeprecated(int flags)
@deprecated
tag in Javadoc comment).flags
- the flagstrue
if the element is marked as deprecatedpublic static boolean isFinal(int flags)
final
modifier.flags
- the flagstrue
if the final
modifier is includedpublic static boolean isInterface(int flags)
interface
modifier.flags
- the flagstrue
if the interface
modifier is includedpublic static boolean isNative(int flags)
native
modifier.flags
- the flagstrue
if the native
modifier is includedpublic static boolean isPrivate(int flags)
private
modifier.flags
- the flagstrue
if the private
modifier is includedpublic static boolean isProtected(int flags)
protected
modifier.flags
- the flagstrue
if the protected
modifier is includedpublic static boolean isPublic(int flags)
public
modifier.flags
- the flagstrue
if the public
modifier is includedpublic static boolean isStatic(int flags)
static
modifier.flags
- the flagstrue
if the static
modifier is includedpublic static boolean isStrictfp(int flags)
strictfp
modifier.flags
- the flagstrue
if the strictfp
modifier is includedpublic static boolean isSynchronized(int flags)
synchronized
modifier.flags
- the flagstrue
if the synchronized
modifier is includedpublic static boolean isSynthetic(int flags)
flags
- the flagstrue
if the element is marked syntheticpublic static boolean isTransient(int flags)
transient
modifier.flags
- the flagstrue
if the transient
modifier is includedpublic static boolean isVolatile(int flags)
volatile
modifier.flags
- the flagstrue
if the volatile
modifier is includedpublic static boolean isBridge(int flags)
AccBridge
bit set.flags
- the flagstrue
if the AccBridge
flag is includedBRIDGE
public static boolean isVarargs(int flags)
AccVarargs
bit set.flags
- the flagstrue
if the AccVarargs
flag is includedVARARGS
public static boolean isEnum(int flags)
AccEnum
bit set.flags
- the flagstrue
if the AccEnum
flag is includedENUM
public static boolean isAnnotation(int flags)
AccAnnotation
bit set.flags
- the flagstrue
if the AccAnnotation
flag is includedANNOTATION
public static java.lang.String toString(int flags)
The flags are output in the following order:
This is a compromise between the orders specified in sections 8.1.1, 8.3.1, 8.4.3, 8.8.3, 9.1.1, and 9.3 of The Java Language Specification, Second Edition (JLS2).public
protected
private
static
abstract
final
native
synchronized
transient
volatile
strictfp
Note that the flags of a method can include the AccVarargs flag that has no standard description. Since the AccVarargs flag has the same value as the AccTransient flag (valid for fields only), attempting to get the description of method modifiers with the AccVarargs flag set would result in an unexpected description. Clients should ensure that the AccVarargs is not included in the flags of a method as follows:
IMethod method = ... int flags = method.getFlags() & ~Flags.AccVarargs; return Flags.toString(flags);
Examples results:
"public static final"
"private native"
flags
- the flags