Class ClassDef

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

public final class ClassDef 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 ClassDef 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
    • asTypeDef

      public ClassTypeDef asTypeDef()
      Description copied from class: ObjectDef
      Get the type definition for this type.
      Overrides:
      asTypeDef in class ObjectDef
      Returns:
      The type definition
    • builder

      public static ClassDef.ClassDefBuilder builder(String name)
    • getFields

      public List<FieldDef> getFields()
    • getTypeVariables

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

      @Nullable public @Nullable ClassTypeDef getSuperclass()
    • findField

      @Nullable public @Nullable FieldDef findField(String name)
    • getField

      @NonNull public @NonNull FieldDef getField(String name)
    • hasField

      public boolean hasField(String name)
    • getStaticInitializer

      @Nullable public @Nullable StatementDef getStaticInitializer()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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()