Package javassist.bytecode
Class AccessFlag
java.lang.Object
javassist.bytecode.AccessFlag
A support class providing static methods and constants
for access modifiers such as public, private, ...
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
clear
(int accflags, int clearBit) Clears a specified bit inaccflags
.static boolean
isPackage
(int accflags) Returns true if the access flags include neither public, protected, or private.static boolean
isPrivate
(int accflags) Returns true if the access flags include the private bit.static boolean
isProtected
(int accflags) Returns true if the access flags include the protected bit.static boolean
isPublic
(int accflags) Returns true if the access flags include the public bit.static int
of
(int modifier) Converts a javassist.Modifier into a javassist.bytecode.AccessFlag.static int
setPackage
(int accflags) Clears the public, protected, and private bits.static int
setPrivate
(int accflags) Truns the private bit on.static int
setProtected
(int accflags) Turns the protected bit on.static int
setPublic
(int accflags) Turns the public bit on.static int
toModifier
(int accflags) Converts a javassist.bytecode.AccessFlag into a javassist.Modifier.
-
Field Details
-
PUBLIC
public static final int PUBLIC- See Also:
-
PRIVATE
public static final int PRIVATE- See Also:
-
PROTECTED
public static final int PROTECTED- See Also:
-
STATIC
public static final int STATIC- See Also:
-
FINAL
public static final int FINAL- See Also:
-
SYNCHRONIZED
public static final int SYNCHRONIZED- See Also:
-
VOLATILE
public static final int VOLATILE- See Also:
-
BRIDGE
public static final int BRIDGE- See Also:
-
TRANSIENT
public static final int TRANSIENT- See Also:
-
VARARGS
public static final int VARARGS- See Also:
-
NATIVE
public static final int NATIVE- See Also:
-
INTERFACE
public static final int INTERFACE- See Also:
-
ABSTRACT
public static final int ABSTRACT- See Also:
-
STRICT
public static final int STRICT- See Also:
-
SYNTHETIC
public static final int SYNTHETIC- See Also:
-
ANNOTATION
public static final int ANNOTATION- See Also:
-
ENUM
public static final int ENUM- See Also:
-
MANDATED
public static final int MANDATED- See Also:
-
SUPER
public static final int SUPER- See Also:
-
MODULE
public static final int MODULE- See Also:
-
-
Constructor Details
-
AccessFlag
public AccessFlag()
-
-
Method Details
-
setPublic
public static int setPublic(int accflags) Turns the public bit on. The protected and private bits are cleared. -
setProtected
public static int setProtected(int accflags) Turns the protected bit on. The protected and public bits are cleared. -
setPrivate
public static int setPrivate(int accflags) Truns the private bit on. The protected and private bits are cleared. -
setPackage
public static int setPackage(int accflags) Clears the public, protected, and private bits. -
isPublic
public static boolean isPublic(int accflags) Returns true if the access flags include the public bit. -
isProtected
public static boolean isProtected(int accflags) Returns true if the access flags include the protected bit. -
isPrivate
public static boolean isPrivate(int accflags) Returns true if the access flags include the private bit. -
isPackage
public static boolean isPackage(int accflags) Returns true if the access flags include neither public, protected, or private. -
clear
public static int clear(int accflags, int clearBit) Clears a specified bit inaccflags
. -
of
public static int of(int modifier) Converts a javassist.Modifier into a javassist.bytecode.AccessFlag.- Parameters:
modifier
- javassist.Modifier
-
toModifier
public static int toModifier(int accflags) Converts a javassist.bytecode.AccessFlag into a javassist.Modifier.- Parameters:
accflags
- javassist.bytecode.Accessflag
-