javassist.bytecode

Class AccessFlag

public class AccessFlag extends Object

A support class providing static methods and constants for access modifiers such as public, rivate, ...
Field Summary
static intABSTRACT
static intANNOTATION
static intBRIDGE
static intENUM
static intFINAL
static intINTERFACE
static intNATIVE
static intPRIVATE
static intPROTECTED
static intPUBLIC
static intSTATIC
static intSTRICT
static intSUPER
static intSYNCHRONIZED
static intSYNTHETIC
static intTRANSIENT
static intVARARGS
static intVOLATILE
Method Summary
static intclear(int accflags, int clearBit)
Clears a specified bit in accflags.
static booleanisPackage(int accflags)
Returns true if the access flags include neither public, protected, or private.
static booleanisPrivate(int accflags)
Returns true if the access flags include the private bit.
static booleanisProtected(int accflags)
Returns true if the access flags include the protected bit.
static booleanisPublic(int accflags)
Returns true if the access flags include the public bit.
static intof(int modifier)
Converts a javassist.Modifier into a javassist.bytecode.AccessFlag.
static intsetPackage(int accflags)
Clears the public, protected, and private bits.
static intsetPrivate(int accflags)
Truns the private bit on.
static intsetProtected(int accflags)
Truns the protected bit on.
static intsetPublic(int accflags)
Truns the public bit on.
static inttoModifier(int accflags)
Converts a javassist.bytecode.AccessFlag into a javassist.Modifier.

Field Detail

ABSTRACT

public static final int ABSTRACT

ANNOTATION

public static final int ANNOTATION

BRIDGE

public static final int BRIDGE

ENUM

public static final int ENUM

FINAL

public static final int FINAL

INTERFACE

public static final int INTERFACE

NATIVE

public static final int NATIVE

PRIVATE

public static final int PRIVATE

PROTECTED

public static final int PROTECTED

PUBLIC

public static final int PUBLIC

STATIC

public static final int STATIC

STRICT

public static final int STRICT

SUPER

public static final int SUPER

SYNCHRONIZED

public static final int SYNCHRONIZED

SYNTHETIC

public static final int SYNTHETIC

TRANSIENT

public static final int TRANSIENT

VARARGS

public static final int VARARGS

VOLATILE

public static final int VOLATILE

Method Detail

clear

public static int clear(int accflags, int clearBit)
Clears a specified bit in accflags.

isPackage

public static boolean isPackage(int accflags)
Returns true if the access flags include neither public, protected, or private.

isPrivate

public static boolean isPrivate(int accflags)
Returns true if the access flags include the private bit.

isProtected

public static boolean isProtected(int accflags)
Returns true if the access flags include the protected bit.

isPublic

public static boolean isPublic(int accflags)
Returns true if the access flags include the public bit.

of

public static int of(int modifier)
Converts a javassist.Modifier into a javassist.bytecode.AccessFlag.

Parameters: modifier javassist.Modifier

setPackage

public static int setPackage(int accflags)
Clears the public, protected, and private bits.

setPrivate

public static int setPrivate(int accflags)
Truns the private bit on. The protected and private bits are cleared.

setProtected

public static int setProtected(int accflags)
Truns the protected bit on. The protected and public bits are cleared.

setPublic

public static int setPublic(int accflags)
Truns the public bit on. The protected and private bits are cleared.

toModifier

public static int toModifier(int accflags)
Converts a javassist.bytecode.AccessFlag into a javassist.Modifier.

Parameters: accflags javassist.bytecode.Accessflag

Javassist, a Java-bytecode translator toolkit.
Copyright (C) 1999-2006 Shigeru Chiba. All Rights Reserved.