Class JavaFieldDeclaration
java.lang.Object
io.spring.initializr.generator.language.java.JavaFieldDeclaration
- All Implemented Interfaces:
Annotatable
Declaration of a field written in Java.
- Author:
- Matt Berteaux
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionReturn theAnnotationContainer
to use to configure the annotations of this element.static JavaFieldDeclaration.Builder
Creates a new builder for the field with the given name.int
Return the modifiers.getName()
Return the name.Return the return type.getValue()
Return the value.boolean
Return whether this field is initialized.
-
Method Details
-
field
Creates a new builder for the field with the given name.- Parameters:
name
- the field name- Returns:
- the builder
-
annotations
Description copied from interface:Annotatable
Return theAnnotationContainer
to use to configure the annotations of this element.- Specified by:
annotations
in interfaceAnnotatable
- Returns:
- the annotation container
-
getModifiers
public int getModifiers()Return the modifiers.- Returns:
- the modifiers
-
getName
Return the name.- Returns:
- the name
-
getReturnType
Return the return type.- Returns:
- the return type
-
getValue
Return the value.- Returns:
- the value
-
isInitialized
public boolean isInitialized()Return whether this field is initialized.- Returns:
- whether the field is initialized.
-