Package org.apache.bcel.classfile
Class AccessFlags
java.lang.Object
org.apache.bcel.classfile.AccessFlags
- Direct Known Subclasses:
ClassGen
,FieldGenOrMethodGen
,FieldOrMethod
,JavaClass
Super class for all objects that have modifiers like private, final, ... I.e. classes, fields, and methods.
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
Deprecated.(since 6.0) will be made private; do not access directly, use getter/setter. -
Constructor Summary
ConstructorDescriptionConstructs a new instance.AccessFlags
(int accessFlags) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionfinal int
Gets access flags.final int
Gets access flags.final boolean
Tests whether the abstract bit is on.final void
isAbstract
(boolean flag) Sets the abstract bit.final boolean
Tests whether the annotation bit is on.final void
isAnnotation
(boolean flag) Sets the annotation bit.final boolean
isEnum()
Tests whether the enum bit is on.final void
isEnum
(boolean flag) Sets the enum bit.final boolean
isFinal()
Tests whether the final bit is on.final void
isFinal
(boolean flag) Sets the final bit.final boolean
Tests whether the interface bit is on.final void
isInterface
(boolean flag) Sets the interface bit.final boolean
isNative()
Tests whether the native bit is on.final void
isNative
(boolean flag) Sets the native bit.final boolean
Tests whether the private bit is on.final void
isPrivate
(boolean flag) Sets the private bit.final boolean
Tests whether the protected bit is on.final void
isProtected
(boolean flag) Sets the protected bit.final boolean
isPublic()
Tests whether the public bit is on.final void
isPublic
(boolean flag) Sets the public bit.final boolean
isStatic()
Tests whether the static bit is on.final void
isStatic
(boolean flag) Sets the static bit.final boolean
Tests whether the strict bit is on.final void
isStrictfp
(boolean flag) Sets the strict bit.final boolean
Tests whether the synchronized bit is on.final void
isSynchronized
(boolean flag) Sets the synchronized bit.final boolean
Tests whether the synthetic bit is on.final void
isSynthetic
(boolean flag) Sets the synthetic bit.final boolean
Tests whether the transient bit is on.final void
isTransient
(boolean flag) Sets the varargs bit.final boolean
Tests whether the varargs bit is on.final void
isVarArgs
(boolean flag) Sets the varargs bit.final boolean
Tests whether the volatile bit is on.final void
isVolatile
(boolean flag) Sets the volatile bit.final void
setAccessFlags
(int accessFlags) Sets access flags also known as modifiers.final void
setModifiers
(int accessFlags) Sets access flags aka "modifiers".
-
Field Details
-
access_flags
Deprecated.(since 6.0) will be made private; do not access directly, use getter/setter.Access flags.
-
-
Constructor Details
-
AccessFlags
public AccessFlags()Constructs a new instance. -
AccessFlags
Constructs a new instance.- Parameters:
accessFlags
- initial access flags.
-
-
Method Details
-
getAccessFlags
Gets access flags.- Returns:
- Access flags of the object aka. "modifiers".
-
getModifiers
Gets access flags.- Returns:
- Access flags of the object also known as modifiers.
-
isAbstract
Tests whether the abstract bit is on.- Returns:
- whether the abstract bit is on.
-
isAbstract
Sets the abstract bit.- Parameters:
flag
- The new value.
-
isAnnotation
Tests whether the annotation bit is on.- Returns:
- whether the annotation bit is on.
-
isAnnotation
Sets the annotation bit.- Parameters:
flag
- The new value.
-
isEnum
Tests whether the enum bit is on.- Returns:
- whether the enum bit is on.
-
isEnum
Sets the enum bit.- Parameters:
flag
- The new value.
-
isFinal
Tests whether the final bit is on.- Returns:
- whether the final bit is on.
-
isFinal
Sets the final bit.- Parameters:
flag
- The new value.
-
isInterface
Tests whether the interface bit is on.- Returns:
- whether the interface bit is on.
-
isInterface
Sets the interface bit.- Parameters:
flag
- The new value.
-
isNative
Tests whether the native bit is on.- Returns:
- whether the native bit is on.
-
isNative
Sets the native bit.- Parameters:
flag
- The new value.
-
isPrivate
Tests whether the private bit is on.- Returns:
- whether the private bit is on.
-
isPrivate
Sets the private bit.- Parameters:
flag
- The new value.
-
isProtected
Tests whether the protected bit is on.- Returns:
- whether the protected bit is on.
-
isProtected
Sets the protected bit.- Parameters:
flag
- The new value.
-
isPublic
Tests whether the public bit is on.- Returns:
- whether the public bit is on.
-
isPublic
Sets the public bit.- Parameters:
flag
- The new value.
-
isStatic
Tests whether the static bit is on.- Returns:
- whether the static bit is on.
-
isStatic
Sets the static bit.- Parameters:
flag
- The new value.
-
isStrictfp
Tests whether the strict bit is on.- Returns:
- whether the strict bit is on.
-
isStrictfp
Sets the strict bit.- Parameters:
flag
- The new value.
-
isSynchronized
Tests whether the synchronized bit is on.- Returns:
- whether the synchronized bit is on.
-
isSynchronized
Sets the synchronized bit.- Parameters:
flag
- The new value.
-
isSynthetic
Tests whether the synthetic bit is on.- Returns:
- whether the synthetic bit is on.
-
isSynthetic
Sets the synthetic bit.- Parameters:
flag
- The new value.
-
isTransient
Tests whether the transient bit is on.- Returns:
- whether the varargs bit is on.
-
isTransient
Sets the varargs bit.- Parameters:
flag
- The new value.
-
isVarArgs
Tests whether the varargs bit is on.- Returns:
- whether the varargs bit is on.
-
isVarArgs
Sets the varargs bit.- Parameters:
flag
- The new value.
-
isVolatile
Tests whether the volatile bit is on.- Returns:
- whether the volatile bit is on.
-
isVolatile
Sets the volatile bit.- Parameters:
flag
- The new value.
-
setAccessFlags
Sets access flags also known as modifiers.- Parameters:
accessFlags
- Access flags of the object.
-
setModifiers
Sets access flags aka "modifiers".- Parameters:
accessFlags
- Access flags of the object.
-