Class AbstractElementBuilder<ThisType>

java.lang.Object
io.micronaut.sourcegen.model.AbstractElementBuilder<ThisType>
Type Parameters:
ThisType - The type of this builder
Direct Known Subclasses:
AnnotationObjectDef.AnnotationMemberDefBuilder, AnnotationObjectDef.AnnotationObjectDefBuilder, FieldDef.FieldDefBuilder, MethodDef.MethodDefBuilder, ObjectDefBuilder, ParameterDef.ParameterDefBuilder, PropertyDef.PropertyDefBuilder

The abstract element builder.
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
    • thisInstance

      protected final ThisType thisInstance
    • synthetic

      protected boolean synthetic
  • Constructor Details

    • AbstractElementBuilder

      protected AbstractElementBuilder(String name)
  • Method Details

    • synthetic

      public final ThisType synthetic()
      Marks the element as synthetic.
      Returns:
      The builder
    • synthetic

      public final ThisType synthetic(boolean synthetic)
      Marks the element as synthetic.
      Parameters:
      synthetic - Is synthetic
      Returns:
      The builder
    • addModifiers

      public final ThisType addModifiers(Collection<Modifier> modifiers)
    • addModifiers

      public final ThisType addModifiers(Modifier... modifiers)
    • overrideModifiers

      public final ThisType overrideModifiers(Modifier... modifiers)
      Overrides the modifiers.
      Parameters:
      modifiers - The modifier
      Returns:
      this type
    • addAnnotation

      public final ThisType addAnnotation(String annotationName)
    • addAnnotation

      public final ThisType addAnnotation(Class<? extends Annotation> annotationType)
    • addAnnotation

      public final ThisType addAnnotation(ClassTypeDef typeDef)
    • addAnnotation

      public final ThisType addAnnotation(AnnotationDef annotationDef)
    • addAnnotations

      public final ThisType addAnnotations(AnnotationDef... annotationDefs)
    • addAnnotations

      public final ThisType addAnnotations(List<AnnotationDef> annotationDefs)
    • addJavadoc

      public final ThisType addJavadoc(String doc)
    • addJavadoc

      public final ThisType addJavadoc(List<String> doc)
      Adds javadoc.
      Parameters:
      doc - The javadoc
      Returns:
      The builder