java.lang.Object
io.helidon.codegen.classmodel.ClassBase
io.helidon.codegen.classmodel.ClassModel

public final class ClassModel extends ClassBase
Entry point to create class model. This model contain all needed information for each generated type and handles resulting generation.
  • Field Details Link icon

    • PADDING_TOKEN Link icon

      public static final String PADDING_TOKEN
      Padding token used for identifying extra padding requirement for content formatting.
      See Also:
    • TYPE_TOKEN Link icon

      public static final String TYPE_TOKEN
      Type token is used to prepend and append to the fully qualified type names to support import handling.
      See Also:
    • TYPE_TOKEN_PATTERN Link icon

      public static final String TYPE_TOKEN_PATTERN
      Pattern in which are type names saved in the content templates.
      See Also:
    • DEFAULT_PADDING Link icon

      public static final String DEFAULT_PADDING
      Default padding used in the generated type.
      See Also:
  • Method Details Link icon

    • builder Link icon

      public static ClassModel.Builder builder()
      Create new ClassModel.Builder instance.
      Returns:
      new builder instance
    • write Link icon

      public void write(Writer writer) throws IOException
      Write created type model. Default padding DEFAULT_PADDING is used.
      Parameters:
      writer - writer to be used
      Throws:
      IOException - write operation failure
    • write Link icon

      public void write(Writer writer, String padding) throws IOException
      Write created type model.
      Parameters:
      writer - writer to be used
      padding - padding to be used
      Throws:
      IOException - write operation failure
    • typeName Link icon

      public TypeName typeName()
      Type name of this class.
      Returns:
      type name
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object
    • annotations Link icon

      public List<Annotation> annotations()
      List of annotations on this component.
      Returns:
      annotations
    • name Link icon

      public String name()
      Name of this component.
      Returns:
      component name
    • accessModifier Link icon

      public AccessModifier accessModifier()
      Access modifier of this component.
      Returns:
      access modifier
    • description Link icon

      public List<String> description()
      Description (javadoc) of this component.
      Returns:
      description lines