Preview
Second Preview of ClassFile API (JEP 466).
Programs can only use FieldBuilder
when preview features are enabled.
Preview features may be removed in a future release,
or upgraded to permanent features of the Java platform.
ClassBuilder#withField(Utf8Entry, Utf8Entry, Consumer)
or to field transforms. The elements of a field can be specified
abstractly (by passing a FieldElement
to with(ClassFileElement)
or concretely by calling the various withXxx
methods.
FieldTransform
Modifier and Type | Method and Description |
---|---|
public Optional | Returns: theFieldModel representing the field being transformed,
if this field builder represents the transformation of some FieldModel Returns the |
public default FieldBuilder | Returns: this builderthe access flags, as a bit mask flags)Sets the field access flags. |
public default FieldBuilder | Returns: this builderthe access flags, as a bit mask flags)Sets the field access flags. |
original | back to summary |
---|---|
public Optional Returns the
|
withFlags | back to summary |
---|---|
public default FieldBuilder withFlags(int flags) Sets the field access flags.
|
withFlags | back to summary |
---|---|
public default FieldBuilder withFlags(AccessFlag... flags) Sets the field access flags.
|