Class RecordDef

java.lang.Object
io.micronaut.sourcegen.model.ObjectDef
io.micronaut.sourcegen.model.RecordDef

public final class RecordDef extends ObjectDef
The class definition.
Since:
1.0
Author:
Denis Stepanov
  • Field Details

    • name

      protected final String name
    • modifiers

      protected final EnumSet<Modifier> modifiers
    • annotations

      protected final List<AnnotationDef> annotations
    • javadoc

      protected final List<String> javadoc
    • synthetic

      protected final boolean synthetic
  • Method Details

    • withClassName

      public RecordDef withClassName(ClassTypeDef.ClassName className)
      Description copied from class: ObjectDef
      Creates a copy of this definition with a new class name.
      Specified by:
      withClassName in class ObjectDef
      Parameters:
      className - The class name
      Returns:
      the copy of this object definition with a new class name
    • builder

      public static RecordDef.RecordDefBuilder builder(String name)
    • getTypeVariables

      public List<TypeDef.TypeVariable> getTypeVariables()
    • getBeanProperties

      public List<io.micronaut.inject.ast.PropertyElement> getBeanProperties(io.micronaut.inject.visitor.VisitorContext visitorContext)
      Turn the record components into bean properties.
      Parameters:
      visitorContext - The visitor context.
      Returns:
      The property elements.
    • getConstructorParameters

      public List<io.micronaut.inject.ast.ParameterElement> getConstructorParameters(io.micronaut.inject.visitor.VisitorContext visitorContext)
      Turn the record components into constructor parameters.
      Parameters:
      visitorContext - The visitor context.
      Returns:
      The constructor parameters.
    • isSynthetic

      public boolean isSynthetic()
      Returns:
      Is synthetic element
    • 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()