Interface FieldBuilder
- All Superinterfaces:
ClassFileBuilder<FieldElement, FieldBuilder>
,Consumer<FieldElement>
A builder for fields. Builders are not created directly; they are passed
to handlers by methods such as
ClassBuilder.withField(Utf8Entry, Utf8Entry, Consumer)
or to field transforms. The elements of a field can be specified
abstractly (by passing a FieldElement
to ClassFileBuilder.with(ClassFileElement)
or concretely by calling the various withXxx
methods.- Since:
- 24
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault FieldBuilder
withFlags
(int flags) Sets the field access flags.default FieldBuilder
withFlags
(AccessFlag... flags) Sets the field access flags.Methods inherited from interface java.lang.classfile.ClassFileBuilder
accept, constantPool, transform, with
-
Method Details
-
withFlags
Sets the field access flags.- Parameters:
flags
- the access flags, as a bit mask- Returns:
- this builder
-
withFlags
Sets the field access flags.- Parameters:
flags
- the access flags, as a bit mask- Returns:
- this builder
-