Class FieldDef

java.lang.Object
io.micronaut.sourcegen.model.FieldDef

public final class FieldDef extends Object
The field definition.
Since:
1.0
Author:
Denis Stepanov
  • Field Details

  • Method Details

    • builder

      @NonNull public static @NonNull FieldDef.FieldDefBuilder builder(@NonNull @NonNull String name)
      Creates a new field builder with a name.
      Parameters:
      name - The filed name
      Returns:
      The field builder
      Since:
      1.5
    • builder

      @NonNull public static @NonNull FieldDef.FieldDefBuilder builder(@NonNull @NonNull String name, @NonNull @NonNull TypeDef type)
      Creates a new field builder with a name and type.
      Parameters:
      name - The filed name
      type - The type
      Returns:
      The field builder
      Since:
      1.5
    • builder

      @NonNull public static @NonNull FieldDef.FieldDefBuilder builder(@NonNull @NonNull String name, @NonNull @NonNull Class<?> type)
      Creates a new field builder with a name and type.
      Parameters:
      name - The filed name
      type - The type
      Returns:
      The field builder
      Since:
      1.5
    • getType

      public TypeDef getType()
    • getInitializer

      public Optional<ExpressionDef> getInitializer()
    • getName

      public final String getName()
    • getModifiers

      public final Set<Modifier> getModifiers()
    • getModifiersArray

      public final Modifier[] getModifiersArray()
    • getAnnotations

      public final List<AnnotationDef> getAnnotations()
    • getJavadoc

      public List<String> getJavadoc()