- All Superinterfaces:
AnnotatableCreator,GenericTyped,MemberCreator,ModifiableCreator,SimpleTyped,Typed
- All Known Subinterfaces:
InstanceFieldCreator,StaticFieldCreator
public sealed interface FieldCreator
extends MemberCreator, GenericTyped
permits InstanceFieldCreator, StaticFieldCreator (not exhaustive)
A creator for a field.
-
Method Summary
Modifier and TypeMethodDescriptiondesc()Returns the field type descriptor.default voidsetInitial(double initial) Provide an initial constant value for this field.default voidsetInitial(float initial) Provide an initial constant value for this field.default voidsetInitial(int initial) Provide an initial constant value for this field.default voidsetInitial(long initial) Provide an initial constant value for this field.voidsetInitial(Const initial) Provide an initial constant value for this field.default voidsetInitial(Class<?> initial) Provide an initial constant value for this field.default voidsetInitial(String initial) Provide an initial constant value for this field.voidsetInitializer(Consumer<BlockCreator> init) Provide an initializer for this field which will be concatenated with the class or instance initializer(s).voidsetType(GenericType type) Change the type of the field to the given type.default voidChange the type of the field to the given type.voidChange the type of the field to the given type.type()Returns the type of this member (notnull).default voidAdd thevolatilemodifier flag to this creator.Methods inherited from interface io.quarkus.gizmo2.creator.AnnotatableCreator
addAnnotation, addAnnotation, addAnnotation, addAnnotationMethods inherited from interface io.quarkus.gizmo2.GenericTyped
genericType, hasGenericTypeMethods inherited from interface io.quarkus.gizmo2.creator.MemberCreator
name, ownerMethods inherited from interface io.quarkus.gizmo2.creator.ModifiableCreator
addFlag, addFlags, addFlags, final_, modifierLocation, packagePrivate, private_, protected_, public_, removeFlag, removeFlags, removeFlags, setAccess, supports, syntheticMethods inherited from interface io.quarkus.gizmo2.SimpleTyped
isPrimitive, isVoid, slotSize, typeKind
-
Method Details
-
type
ClassDesc type()Description copied from interface:MemberCreatorReturns the type of this member (notnull).- Specified by:
typein interfaceMemberCreator- Specified by:
typein interfaceSimpleTyped- Specified by:
typein interfaceTyped- Returns:
- the type of this member (not
null)
-
desc
FieldDesc desc()Returns the field type descriptor.- Specified by:
descin interfaceMemberCreator- Returns:
- the field type descriptor
-
setType
Change the type of the field to the given type.- Parameters:
type- the generic type (must not benull)
-
setType
Change the type of the field to the given type.- Parameters:
type- the class type descriptor (must not benull)
-
setType
Change the type of the field to the given type.- Parameters:
type- the class type (must not benull)
-
setInitial
Provide an initial constant value for this field.- Parameters:
initial- the initial value (must not benull)
-
setInitial
default void setInitial(int initial) Provide an initial constant value for this field.- Parameters:
initial- the initial value
-
setInitial
default void setInitial(long initial) Provide an initial constant value for this field.- Parameters:
initial- the initial value
-
setInitial
default void setInitial(float initial) Provide an initial constant value for this field.- Parameters:
initial- the initial value
-
setInitial
default void setInitial(double initial) Provide an initial constant value for this field.- Parameters:
initial- the initial value
-
setInitial
Provide an initial constant value for this field.- Parameters:
initial- the initial value
-
setInitial
Provide an initial constant value for this field.- Parameters:
initial- the initial value
-
setInitializer
Provide an initializer for this field which will be concatenated with the class or instance initializer(s).- Parameters:
init- the builder for the initializer which yields the field initial value (must not benull)
-
volatile_
default void volatile_()Add thevolatilemodifier flag to this creator.
-