com.android.dx.rop.code
Class AccessFlags

java.lang.Object
  extended by 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
static int ACC_ABSTRACT
          abstract method / class
static int ACC_ANNOTATION
          class is an annotation type
static int ACC_BRIDGE
          bridge method (generated)
static int ACC_CONSTRUCTOR
          method is a constructor
static int ACC_DECLARED_SYNCHRONIZED
          method was declared synchronized; has no effect on execution (other than inspecting this flag, per se)
static int ACC_ENUM
          class is an enumerated type; field is an element of an enumerated type
static int ACC_FINAL
          final member / class
static int ACC_INTERFACE
          "class" is in fact an public static final interface
static int ACC_NATIVE
          native method
static int ACC_PRIVATE
          private member
static int ACC_PROTECTED
          protected member
static int ACC_PUBLIC
          public member / class
static int ACC_STATIC
          static member
static int ACC_STRICT
          method with strict floating point (strictfp) behavior
static int ACC_SUPER
          class with new-style invokespecial for superclass method access
static int ACC_SYNCHRONIZED
          synchronized method; only valid in dex files for native methods
static int ACC_SYNTHETIC
          synthetic member
static int ACC_TRANSIENT
          transient field
static int ACC_VARARGS
          varargs method
static int ACC_VOLATILE
          volatile field
static int CLASS_FLAGS
          flags defined on classes
static int FIELD_FLAGS
          flags defined on fields
static int INNER_CLASS_FLAGS
          flags defined on inner classes
static int METHOD_FLAGS
          flags defined on methods
 
Method Summary
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 isDeclaredSynchronized(int flags)
          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 Detail

ACC_PUBLIC

public static final int ACC_PUBLIC
public member / class

See Also:
Constant Field Values

ACC_PRIVATE

public static final int ACC_PRIVATE
private member

See Also:
Constant Field Values

ACC_PROTECTED

public static final int ACC_PROTECTED
protected member

See Also:
Constant Field Values

ACC_STATIC

public static final int ACC_STATIC
static member

See Also:
Constant Field Values

ACC_FINAL

public static final int ACC_FINAL
final member / class

See Also:
Constant Field Values

ACC_SYNCHRONIZED

public static final int ACC_SYNCHRONIZED
synchronized method; only valid in dex files for native methods

See Also:
Constant Field Values

ACC_SUPER

public static final int ACC_SUPER
class with new-style invokespecial for superclass method access

See Also:
Constant Field Values

ACC_VOLATILE

public static final int ACC_VOLATILE
volatile field

See Also:
Constant Field Values

ACC_BRIDGE

public static final int ACC_BRIDGE
bridge method (generated)

See Also:
Constant Field Values

ACC_TRANSIENT

public static final int ACC_TRANSIENT
transient field

See Also:
Constant Field Values

ACC_VARARGS

public static final int ACC_VARARGS
varargs method

See Also:
Constant Field Values

ACC_NATIVE

public static final int ACC_NATIVE
native method

See Also:
Constant Field Values

ACC_INTERFACE

public static final int ACC_INTERFACE
"class" is in fact an public static final interface

See Also:
Constant Field Values

ACC_ABSTRACT

public static final int ACC_ABSTRACT
abstract method / class

See Also:
Constant Field Values

ACC_STRICT

public static final int ACC_STRICT
method with strict floating point (strictfp) behavior

See Also:
Constant Field Values

ACC_SYNTHETIC

public static final int ACC_SYNTHETIC
synthetic member

See Also:
Constant Field Values

ACC_ANNOTATION

public static final int ACC_ANNOTATION
class is an annotation type

See Also:
Constant Field Values

ACC_ENUM

public static final int ACC_ENUM
class is an enumerated type; field is an element of an enumerated type

See Also:
Constant Field Values

ACC_CONSTRUCTOR

public static final int ACC_CONSTRUCTOR
method is a constructor

See Also:
Constant Field Values

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:
Constant Field Values

CLASS_FLAGS

public static final int CLASS_FLAGS
flags defined on classes

See Also:
Constant Field Values

INNER_CLASS_FLAGS

public static final int INNER_CLASS_FLAGS
flags defined on inner classes

See Also:
Constant Field Values

FIELD_FLAGS

public static final int FIELD_FLAGS
flags defined on fields

See Also:
Constant Field Values

METHOD_FLAGS

public static final int METHOD_FLAGS
flags defined on methods

See Also:
Constant Field Values
Method Detail

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


Copyright © 2015. All rights reserved.