ProGuard

proguard.classfile.util
Class AccessUtil

java.lang.Object
  extended byproguard.classfile.util.AccessUtil

public class AccessUtil
extends Object

Utility methods for working with access flags. For convenience, this class defines access levels, in ascending order: PRIVATE, PACKAGE_VISIBLE, PROTECTED, and PUBLIC.


Field Summary
static int PACKAGE_VISIBLE
           
static int PRIVATE
           
static int PROTECTED
           
static int PUBLIC
           
 
Constructor Summary
AccessUtil()
           
 
Method Summary
static int accessFlags(int accessLevel)
          Returns the corresponding access flags of the given access level.
static int accessLevel(int accessFlags)
          Returns the corresponding access level of the given access flags.
static int replaceAccessFlags(int accessFlags, int newAccessFlags)
          Replaces the access part of the given access flags.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRIVATE

public static final int PRIVATE
See Also:
Constant Field Values

PACKAGE_VISIBLE

public static final int PACKAGE_VISIBLE
See Also:
Constant Field Values

PROTECTED

public static final int PROTECTED
See Also:
Constant Field Values

PUBLIC

public static final int PUBLIC
See Also:
Constant Field Values
Constructor Detail

AccessUtil

public AccessUtil()
Method Detail

accessLevel

public static int accessLevel(int accessFlags)
Returns the corresponding access level of the given access flags.

Parameters:
accessFlags - the internal access flags.
Returns:
the corresponding access level: PRIVATE, PACKAGE_VISIBLE, PROTECTED, or PUBLIC.

accessFlags

public static int accessFlags(int accessLevel)
Returns the corresponding access flags of the given access level.

Parameters:
accessLevel - the access level: PRIVATE, PACKAGE_VISIBLE, PROTECTED, or PUBLIC.
Returns:
the corresponding internal access flags, the internal access flags as a logical bit mask of INTERNAL_ACC_PRIVATE, INTERNAL_ACC_PROTECTED, and INTERNAL_ACC_PUBLIC.

replaceAccessFlags

public static int replaceAccessFlags(int accessFlags,
                                     int newAccessFlags)
Replaces the access part of the given access flags.

Parameters:
accessFlags - the internal access flags.

ProGuard