Class JavaFieldDeclaration

java.lang.Object
io.spring.initializr.generator.language.java.JavaFieldDeclaration
All Implemented Interfaces:
Annotatable

public final class JavaFieldDeclaration extends Object implements Annotatable
Declaration of a field written in Java.
Author:
Matt Berteaux
  • Method Details

    • field

      public static JavaFieldDeclaration.Builder field(String name)
      Creates a new builder for the field with the given name.
      Parameters:
      name - the field name
      Returns:
      the builder
    • annotations

      public AnnotationContainer annotations()
      Description copied from interface: Annotatable
      Return the AnnotationContainer to use to configure the annotations of this element.
      Specified by:
      annotations in interface Annotatable
      Returns:
      the annotation container
    • getModifiers

      public int getModifiers()
      Return the modifiers.
      Returns:
      the modifiers
    • getName

      public String getName()
      Return the name.
      Returns:
      the name
    • getReturnType

      public String getReturnType()
      Return the return type.
      Returns:
      the return type
    • getValue

      public Object getValue()
      Return the value.
      Returns:
      the value
    • isInitialized

      public boolean isInitialized()
      Return whether this field is initialized.
      Returns:
      whether the field is initialized.