Class AccessFlags

java.lang.Object
com.android.dx.rop.code.AccessFlags

public final class AccessFlags extends Object
Constants used as "access flags" in various places in classes, and related utilities. Although, at the rop layer, flags are generally ignored, this is the layer of communication, and as such, this package is where these definitions belong. The flag definitions are identical to Java access flags, but ACC_SUPER isn't used at all in translated code, and ACC_SYNCHRONIZED is only used in a very limited way.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    abstract method / class
    static final int
    class is an annotation type
    static final int
    bridge method (generated)
    static final int
    method is a constructor
    static final int
    method was declared synchronized; has no effect on execution (other than inspecting this flag, per se)
    static final int
    class is an enumerated type; field is an element of an enumerated type
    static final int
    final member / class
    static final int
    "class" is in fact an public static final interface
    static final int
    native method
    static final int
    private member
    static final int
    protected member
    static final int
    public member / class
    static final int
    static member
    static final int
    method with strict floating point (strictfp) behavior
    static final int
    class with new-style invokespecial for superclass method access
    static final int
    synchronized method; only valid in dex files for native methods
    static final int
    synthetic member
    static final int
    transient field
    static final int
    varargs method
    static final int
    volatile field
    static final int
    flags defined on classes
    static final int
    flags defined on fields
    static final int
    flags defined on inner classes
    static final int
    flags defined on methods
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    classString(int flags)
    Returns a human-oriented string representing the given access flags, as defined on classes (not fields or methods).
    static String
    fieldString(int flags)
    Returns a human-oriented string representing the given access flags, as defined on fields (not classes or methods).
    static String
    innerClassString(int flags)
    Returns a human-oriented string representing the given access flags, as defined on inner classes.
    static boolean
    isAbstract(int flags)
    Returns whether the flag ACC_ABSTRACT is on in the given flags.
    static boolean
    isAnnotation(int flags)
    Returns whether the flag ACC_ANNOTATION is on in the given flags.
    static boolean
    isConstructor(int flags)
    Returns whether the flag ACC_CONSTRUCTOR is on in the given flags.
    static boolean
    Returns whether the flag ACC_DECLARED_SYNCHRONIZED is on in the given flags.
    static boolean
    isEnum(int flags)
    Returns whether the flag ACC_ENUM is on in the given flags.
    static boolean
    isInterface(int flags)
    Returns whether the flag ACC_INTERFACE is on in the given flags.
    static boolean
    isNative(int flags)
    Returns whether the flag ACC_NATIVE is on in the given flags.
    static boolean
    isPrivate(int flags)
    Returns whether the flag ACC_PRIVATE is on in the given flags.
    static boolean
    isProtected(int flags)
    Returns whether the flag ACC_PROTECTED is on in the given flags.
    static boolean
    isPublic(int flags)
    Returns whether the flag ACC_PUBLIC is on in the given flags.
    static boolean
    isStatic(int flags)
    Returns whether the flag ACC_STATIC is on in the given flags.
    static boolean
    isSynchronized(int flags)
    Returns whether the flag ACC_SYNCHRONIZED is on in the given flags.
    static String
    methodString(int flags)
    Returns a human-oriented string representing the given access flags, as defined on methods (not classes or fields).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ACC_PUBLIC

      public static final int ACC_PUBLIC
      public member / class
      See Also:
    • ACC_PRIVATE

      public static final int ACC_PRIVATE
      private member
      See Also:
    • ACC_PROTECTED

      public static final int ACC_PROTECTED
      protected member
      See Also:
    • ACC_STATIC

      public static final int ACC_STATIC
      static member
      See Also:
    • ACC_FINAL

      public static final int ACC_FINAL
      final member / class
      See Also:
    • ACC_SYNCHRONIZED

      public static final int ACC_SYNCHRONIZED
      synchronized method; only valid in dex files for native methods
      See Also:
    • ACC_SUPER

      public static final int ACC_SUPER
      class with new-style invokespecial for superclass method access
      See Also:
    • ACC_VOLATILE

      public static final int ACC_VOLATILE
      volatile field
      See Also:
    • ACC_BRIDGE

      public static final int ACC_BRIDGE
      bridge method (generated)
      See Also:
    • ACC_TRANSIENT

      public static final int ACC_TRANSIENT
      transient field
      See Also:
    • ACC_VARARGS

      public static final int ACC_VARARGS
      varargs method
      See Also:
    • ACC_NATIVE

      public static final int ACC_NATIVE
      native method
      See Also:
    • ACC_INTERFACE

      public static final int ACC_INTERFACE
      "class" is in fact an public static final interface
      See Also:
    • ACC_ABSTRACT

      public static final int ACC_ABSTRACT
      abstract method / class
      See Also:
    • ACC_STRICT

      public static final int ACC_STRICT
      method with strict floating point (strictfp) behavior
      See Also:
    • ACC_SYNTHETIC

      public static final int ACC_SYNTHETIC
      synthetic member
      See Also:
    • ACC_ANNOTATION

      public static final int ACC_ANNOTATION
      class is an annotation type
      See Also:
    • ACC_ENUM

      public static final int ACC_ENUM
      class is an enumerated type; field is an element of an enumerated type
      See Also:
    • ACC_CONSTRUCTOR

      public static final int ACC_CONSTRUCTOR
      method is a constructor
      See Also:
    • ACC_DECLARED_SYNCHRONIZED

      public static final int ACC_DECLARED_SYNCHRONIZED
      method was declared synchronized; has no effect on execution (other than inspecting this flag, per se)
      See Also:
    • CLASS_FLAGS

      public static final int CLASS_FLAGS
      flags defined on classes
      See Also:
    • INNER_CLASS_FLAGS

      public static final int INNER_CLASS_FLAGS
      flags defined on inner classes
      See Also:
    • FIELD_FLAGS

      public static final int FIELD_FLAGS
      flags defined on fields
      See Also:
    • METHOD_FLAGS

      public static final int METHOD_FLAGS
      flags defined on methods
      See Also:
  • Method Details

    • classString

      public static String classString(int flags)
      Returns a human-oriented string representing the given access flags, as defined on classes (not fields or methods).
      Parameters:
      flags - the flags
      Returns:
      non-null; human-oriented string
    • innerClassString

      public static String innerClassString(int flags)
      Returns a human-oriented string representing the given access flags, as defined on inner classes.
      Parameters:
      flags - the flags
      Returns:
      non-null; human-oriented string
    • fieldString

      public static String fieldString(int flags)
      Returns a human-oriented string representing the given access flags, as defined on fields (not classes or methods).
      Parameters:
      flags - the flags
      Returns:
      non-null; human-oriented string
    • methodString

      public static String methodString(int flags)
      Returns a human-oriented string representing the given access flags, as defined on methods (not classes or fields).
      Parameters:
      flags - the flags
      Returns:
      non-null; human-oriented string
    • isPublic

      public static boolean isPublic(int flags)
      Returns whether the flag ACC_PUBLIC is on in the given flags.
      Parameters:
      flags - the flags to check
      Returns:
      the value of the ACC_PUBLIC flag
    • isProtected

      public static boolean isProtected(int flags)
      Returns whether the flag ACC_PROTECTED is on in the given flags.
      Parameters:
      flags - the flags to check
      Returns:
      the value of the ACC_PROTECTED flag
    • isPrivate

      public static boolean isPrivate(int flags)
      Returns whether the flag ACC_PRIVATE is on in the given flags.
      Parameters:
      flags - the flags to check
      Returns:
      the value of the ACC_PRIVATE flag
    • isStatic

      public static boolean isStatic(int flags)
      Returns whether the flag ACC_STATIC is on in the given flags.
      Parameters:
      flags - the flags to check
      Returns:
      the value of the ACC_STATIC flag
    • isConstructor

      public static boolean isConstructor(int flags)
      Returns whether the flag ACC_CONSTRUCTOR is on in the given flags.
      Parameters:
      flags - the flags to check
      Returns:
      the value of the ACC_CONSTRUCTOR flag
    • isInterface

      public static boolean isInterface(int flags)
      Returns whether the flag ACC_INTERFACE is on in the given flags.
      Parameters:
      flags - the flags to check
      Returns:
      the value of the ACC_INTERFACE flag
    • isSynchronized

      public static boolean isSynchronized(int flags)
      Returns whether the flag ACC_SYNCHRONIZED is on in the given flags.
      Parameters:
      flags - the flags to check
      Returns:
      the value of the ACC_SYNCHRONIZED flag
    • isAbstract

      public static boolean isAbstract(int flags)
      Returns whether the flag ACC_ABSTRACT is on in the given flags.
      Parameters:
      flags - the flags to check
      Returns:
      the value of the ACC_ABSTRACT flag
    • isNative

      public static boolean isNative(int flags)
      Returns whether the flag ACC_NATIVE is on in the given flags.
      Parameters:
      flags - the flags to check
      Returns:
      the value of the ACC_NATIVE flag
    • isAnnotation

      public static boolean isAnnotation(int flags)
      Returns whether the flag ACC_ANNOTATION is on in the given flags.
      Parameters:
      flags - the flags to check
      Returns:
      the value of the ACC_ANNOTATION flag
    • isDeclaredSynchronized

      public static boolean isDeclaredSynchronized(int flags)
      Returns whether the flag ACC_DECLARED_SYNCHRONIZED is on in the given flags.
      Parameters:
      flags - the flags to check
      Returns:
      the value of the ACC_DECLARED_SYNCHRONIZED flag
    • isEnum

      public static boolean isEnum(int flags)
      Returns whether the flag ACC_ENUM is on in the given flags.
      Parameters:
      flags - the flags to check
      Returns:
      the value of the ACC_ENUM flag