Fields Summary |
---|
public static final int | ACC_PUBLICpublic member / class |
public static final int | ACC_PRIVATEprivate member |
public static final int | ACC_PROTECTEDprotected member |
public static final int | ACC_STATICstatic member |
public static final int | ACC_FINALfinal member / class |
public static final int | ACC_SYNCHRONIZEDsynchronized method; only valid in dex files for {@code native}
methods |
public static final int | ACC_SUPERclass with new-style {@code invokespecial} for superclass
method access |
public static final int | ACC_VOLATILEvolatile field |
public static final int | ACC_BRIDGEbridge method (generated) |
public static final int | ACC_TRANSIENTtransient field |
public static final int | ACC_VARARGSvarargs method |
public static final int | ACC_NATIVEnative method |
public static final int | ACC_INTERFACE"class" is in fact an public static final interface |
public static final int | ACC_ABSTRACTabstract method / class |
public static final int | ACC_STRICTmethod with strict floating point ({@code strictfp})
behavior |
public static final int | ACC_SYNTHETICsynthetic member |
public static final int | ACC_ANNOTATIONclass is an annotation type |
public static final int | ACC_ENUMclass is an enumerated type; field is an element of an enumerated
type |
public static final int | ACC_CONSTRUCTORmethod is a constructor |
public static final int | ACC_DECLARED_SYNCHRONIZEDmethod was declared {@code synchronized}; has no effect on
execution (other than inspecting this flag, per se) |
public static final int | CLASS_FLAGSflags defined on classes |
public static final int | INNER_CLASS_FLAGSflags defined on inner classes |
public static final int | FIELD_FLAGSflags defined on fields |
public static final int | METHOD_FLAGSflags defined on methods |
private static final int | CONV_CLASSindicates conversion of class flags |
private static final int | CONV_FIELDindicates conversion of field flags |
private static final int | CONV_METHODindicates conversion of method flags |
Methods Summary |
---|
public static java.lang.String | classString(int flags)Returns a human-oriented string representing the given access flags,
as defined on classes (not fields or methods).
return humanHelper(flags, CLASS_FLAGS, CONV_CLASS);
|
public static java.lang.String | fieldString(int flags)Returns a human-oriented string representing the given access flags,
as defined on fields (not classes or methods).
return humanHelper(flags, FIELD_FLAGS, CONV_FIELD);
|
private static java.lang.String | humanHelper(int flags, int mask, int what)Helper to return a human-oriented string representing the given
access flags.
StringBuffer sb = new StringBuffer(80);
int extra = flags & ~mask;
flags &= mask;
if ((flags & ACC_PUBLIC) != 0) {
sb.append("|public");
}
if ((flags & ACC_PRIVATE) != 0) {
sb.append("|private");
}
if ((flags & ACC_PROTECTED) != 0) {
sb.append("|protected");
}
if ((flags & ACC_STATIC) != 0) {
sb.append("|static");
}
if ((flags & ACC_FINAL) != 0) {
sb.append("|final");
}
if ((flags & ACC_SYNCHRONIZED) != 0) {
if (what == CONV_CLASS) {
sb.append("|super");
} else {
sb.append("|synchronized");
}
}
if ((flags & ACC_VOLATILE) != 0) {
if (what == CONV_METHOD) {
sb.append("|bridge");
} else {
sb.append("|volatile");
}
}
if ((flags & ACC_TRANSIENT) != 0) {
if (what == CONV_METHOD) {
sb.append("|varargs");
} else {
sb.append("|transient");
}
}
if ((flags & ACC_NATIVE) != 0) {
sb.append("|native");
}
if ((flags & ACC_INTERFACE) != 0) {
sb.append("|interface");
}
if ((flags & ACC_ABSTRACT) != 0) {
sb.append("|abstract");
}
if ((flags & ACC_STRICT) != 0) {
sb.append("|strictfp");
}
if ((flags & ACC_SYNTHETIC) != 0) {
sb.append("|synthetic");
}
if ((flags & ACC_ANNOTATION) != 0) {
sb.append("|annotation");
}
if ((flags & ACC_ENUM) != 0) {
sb.append("|enum");
}
if ((flags & ACC_CONSTRUCTOR) != 0) {
sb.append("|constructor");
}
if ((flags & ACC_DECLARED_SYNCHRONIZED) != 0) {
sb.append("|declared_synchronized");
}
if ((extra != 0) || (sb.length() == 0)) {
sb.append('|");
sb.append(Hex.u2(extra));
}
return sb.substring(1);
|
public static java.lang.String | innerClassString(int flags)Returns a human-oriented string representing the given access flags,
as defined on inner classes.
return humanHelper(flags, INNER_CLASS_FLAGS, CONV_CLASS);
|
public static boolean | isAbstract(int flags)Returns whether the flag {@code ACC_ABSTRACT} is on in the given
flags.
return (flags & ACC_ABSTRACT) != 0;
|
public static boolean | isAnnotation(int flags)Returns whether the flag {@code ACC_ANNOTATION} is on in the given
flags.
return (flags & ACC_ANNOTATION) != 0;
|
public static boolean | isDeclaredSynchronized(int flags)Returns whether the flag {@code ACC_DECLARED_SYNCHRONIZED} is
on in the given flags.
return (flags & ACC_DECLARED_SYNCHRONIZED) != 0;
|
public static boolean | isNative(int flags)Returns whether the flag {@code ACC_NATIVE} is on in the given
flags.
return (flags & ACC_NATIVE) != 0;
|
public static boolean | isPrivate(int flags)Returns whether the flag {@code ACC_PRIVATE} is on in the given
flags.
return (flags & ACC_PRIVATE) != 0;
|
public static boolean | isProtected(int flags)Returns whether the flag {@code ACC_PROTECTED} is on in the given
flags.
return (flags & ACC_PROTECTED) != 0;
|
public static boolean | isPublic(int flags)Returns whether the flag {@code ACC_PUBLIC} is on in the given
flags.
return (flags & ACC_PUBLIC) != 0;
|
public static boolean | isStatic(int flags)Returns whether the flag {@code ACC_STATIC} is on in the given
flags.
return (flags & ACC_STATIC) != 0;
|
public static boolean | isSynchronized(int flags)Returns whether the flag {@code ACC_SYNCHRONIZED} is on in
the given flags.
return (flags & ACC_SYNCHRONIZED) != 0;
|
public static java.lang.String | methodString(int flags)Returns a human-oriented string representing the given access flags,
as defined on methods (not classes or fields).
return humanHelper(flags, METHOD_FLAGS, CONV_METHOD);
|