Preview
Second Preview of ClassFile API (JEP 466).
Programs can only use AccessFlags
when preview features are enabled.
Preview features may be removed in a future release,
or upgraded to permanent features of the Java platform.
ClassElement
, FieldElement
, or MethodElement
when traversing the corresponding model type.
Modifier and Type | Method and Description |
---|---|
public Set | |
public int | |
public boolean | Returns: whether the specified flag is presentthe flag to test flag)Returns whether the specified flag is present. |
public AccessFlag. | Returns: the classfile location for this element, which is either class, method, or fieldReturns the classfile location for this element, which is either class, method, or field. |
public static AccessFlags | Returns: an AccessFlags for a classthe flags to be set, as a bit mask mask)Returns an AccessFlags for a class. |
public static AccessFlags | Returns: an AccessFlags for a classthe flags to be set flags)Returns an AccessFlags for a class. |
public static AccessFlags | Returns: an AccessFlags for a fieldthe flags to be set, as a bit mask mask)Returns an AccessFlags for a field. |
public static AccessFlags | Returns: an AccessFlags for a fieldthe flags to be set flags)Returns an AccessFlags for a field. |
public static AccessFlags | Returns: an AccessFlags for a methodthe flags to be set, as a bit mask mask)Returns an AccessFlags for a method. |
public static AccessFlags | Returns: an AccessFlags for a methodthe flags to be set flags)Returns an AccessFlags for a method. |
flags | back to summary |
---|---|
public Set Returns the access flags.
|
flagsMask | back to summary |
---|---|
public int flagsMask() Returns the access flags, as a bit mask.
|
has | back to summary |
---|---|
public boolean has(AccessFlag flag) Returns whether the specified flag is present. The specified flag should be a valid flag for the classfile location associated with this element otherwise false is returned.
|
location | back to summary |
---|---|
public AccessFlag. Returns the classfile location for this element, which is either class, method, or field.
|
ofClass | back to summary |
---|---|
public static AccessFlags ofClass(int mask) Returns an AccessFlags for a class.
|
ofClass | back to summary |
---|---|
public static AccessFlags ofClass(AccessFlag... flags) Returns an AccessFlags for a class.
|
ofField | back to summary |
---|---|
public static AccessFlags ofField(int mask) Returns an AccessFlags for a field.
|
ofField | back to summary |
---|---|
public static AccessFlags ofField(AccessFlag... flags) Returns an AccessFlags for a field.
|
ofMethod | back to summary |
---|---|
public static AccessFlags ofMethod(int mask) Returns an AccessFlags for a method.
|
ofMethod | back to summary |
---|---|
public static AccessFlags ofMethod(AccessFlag... flags) Returns an AccessFlags for a method.
|