Fields Summary |
---|
public static final int | PUBLICThe {@code int} value representing the {@code public}
modifier. |
public static final int | PRIVATEThe {@code int} value representing the {@code private}
modifier. |
public static final int | PROTECTEDThe {@code int} value representing the {@code protected}
modifier. |
public static final int | STATICThe {@code int} value representing the {@code static} modifier. |
public static final int | FINALThe {@code int} value representing the {@code final} modifier. |
public static final int | SYNCHRONIZEDThe {@code int} value representing the {@code synchronized}
modifier. |
public static final int | VOLATILEThe {@code int} value representing the {@code volatile}
modifier. |
public static final int | TRANSIENTThe {@code int} value representing the {@code transient}
modifier. |
public static final int | NATIVEThe {@code int} value representing the {@code native} modifier. |
public static final int | INTERFACEThe {@code int} value representing the {@code interface}
modifier. |
public static final int | ABSTRACTThe {@code int} value representing the {@code abstract}
modifier. |
public static final int | STRICTThe {@code int} value representing the {@code strict} modifier. |
static final int | BRIDGE |
static final int | VARARGS |
static final int | SYNTHETIC |
static final int | ANNOTATION |
static final int | ENUM |
Methods Summary |
---|
public static boolean | isAbstract(int modifiers)Indicates whether or not the specified modifiers contain the {@code
abstract} modifier.
return ((modifiers & ABSTRACT) != 0);
|
public static boolean | isFinal(int modifiers)Indicates whether or not the specified modifiers contain the {@code
final} modifier.
return ((modifiers & FINAL) != 0);
|
public static boolean | isInterface(int modifiers)Indicates whether or not the specified modifiers contain the {@code
interface} modifier.
return ((modifiers & INTERFACE) != 0);
|
public static boolean | isNative(int modifiers)Indicates whether or not the specified modifiers contain the {@code
native} modifier.
return ((modifiers & NATIVE) != 0);
|
public static boolean | isPrivate(int modifiers)Indicates whether or not the specified modifiers contain the {@code
private} modifier.
return ((modifiers & PRIVATE) != 0);
|
public static boolean | isProtected(int modifiers)Indicates whether or not the specified modifiers contain the {@code
protected} modifier.
return ((modifiers & PROTECTED) != 0);
|
public static boolean | isPublic(int modifiers)Indicates whether or not the specified modifiers contain the {@code
public} modifier.
return ((modifiers & PUBLIC) != 0);
|
public static boolean | isStatic(int modifiers)Indicates whether or not the specified modifiers contain the {@code
static} modifier.
return ((modifiers & STATIC) != 0);
|
public static boolean | isStrict(int modifiers)Indicates whether or not the specified modifiers contain the {@code
strict} modifier.
return ((modifiers & STRICT) != 0);
|
public static boolean | isSynchronized(int modifiers)Indicates whether or not the specified modifiers contain the {@code
synchronized} modifier.
return ((modifiers & SYNCHRONIZED) != 0);
|
public static boolean | isTransient(int modifiers)Indicates whether or not the specified modifiers contain the {@code
transient} modifier.
return ((modifiers & TRANSIENT) != 0);
|
public static boolean | isVolatile(int modifiers)Indicates whether or not the specified modifiers contain the {@code
volatile} modifier.
return ((modifiers & VOLATILE) != 0);
|
public static java.lang.String | toString(int modifiers)Returns a string containing the string representation of all modifiers
present in the specified modifiers. Modifiers appear in the order
specified by the Java Language Specification:
{@code public private protected abstract static final transient volatile native synchronized interface strict}
StringBuffer buf;
buf = new StringBuffer();
if (isPublic(modifiers)) {
buf.append("public ");
}
if (isProtected(modifiers)) {
buf.append("protected ");
}
if (isPrivate(modifiers)) {
buf.append("private ");
}
if (isAbstract(modifiers)) {
buf.append("abstract ");
}
if (isStatic(modifiers)) {
buf.append("static ");
}
if (isFinal(modifiers)) {
buf.append("final ");
}
if (isTransient(modifiers)) {
buf.append("transient ");
}
if (isVolatile(modifiers)) {
buf.append("volatile ");
}
if (isSynchronized(modifiers)) {
buf.append("synchronized ");
}
if (isNative(modifiers)) {
buf.append("native ");
}
if (isStrict(modifiers)) {
buf.append("strictfp ");
}
if (isInterface(modifiers)) {
buf.append("interface ");
}
if (buf.length() == 0) {
return "";
}
buf.setLength(buf.length() - 1);
return buf.toString();
|