public class Modifiers
extends java.lang.Object
| Constructor and Description |
|---|
Modifiers() |
| Modifier and Type | Method and Description |
|---|---|
static int |
add(int modifiers,
int flag)
Add a flag to the given modifiers.
|
static boolean |
has(int modifiers,
int flag)
Check if the given modifiers have the given flag.
|
static boolean |
hasAll(int modifiers,
int... flags)
Check if the given modifiers have all of the given flags.
|
static boolean |
hasAny(int modifiers,
int... flags)
Check if the given modifiers have any of the given flags.
|
static int |
remove(int modifiers,
int flag)
Remove a flag from the given modifiers.
|
static int |
set(int modifiers,
int flag,
boolean state)
Set a flag of the given modifiers to the given state.
|
static int |
setAccess(int modifiers,
int access)
Set the access of the given modifiers.
|
public static int add(int modifiers,
int flag)
modifiers - The modifiersflag - The flag to addpublic static int remove(int modifiers,
int flag)
modifiers - The modifiersflag - The flag to removepublic static int set(int modifiers,
int flag,
boolean state)
modifiers - The modifiersflag - The flag to setstate - The state to set the flag topublic static boolean has(int modifiers,
int flag)
modifiers - The modifiersflag - The flag to checkpublic static boolean hasAny(int modifiers,
int... flags)
modifiers - The modifiersflags - The flags to checkpublic static boolean hasAll(int modifiers,
int... flags)
modifiers - The modifiersflags - The flags to checkpublic static int setAccess(int modifiers,
int access)
Opcodes.ACC_PUBLIC, Opcodes.ACC_PROTECTED, Opcodes.ACC_PRIVATE will be removed and the given access will be added.modifiers - The modifiersaccess - The access to set