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

    • PADDING_TOKEN

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

      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

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

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

    • builder

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

      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

      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

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

      public String toString()
      Overrides:
      toString in class Object