Interface IGenerationState<WRITER>

Type Parameters:
WRITER - the type of writer used for schema output
All Known Implementing Classes:
AbstractGenerationState

public interface IGenerationState<WRITER>
Represents the state information used during schema generation.
  • Method Details

    • getModule

      @NonNull IModule getModule()
      Get the Metaschema module being processed for schema generation.
      Returns:
      the module
    • getWriter

      @NonNull WRITER getWriter()
      Get the writer used for schema output.

      The caller does not own this writer and must not close it.

      Returns:
      the writer instance
    • getRootDefinitions

      @NonNull default Collection<? extends IAssemblyDefinition> getRootDefinitions()
      Get the collection of root assembly definitions exported by the module.
      Returns:
      the root assembly definitions
    • isInline

      boolean isInline(@NonNull IDefinition definition)
      Determine if the provided definition should be inlined in the generated schema.
      Parameters:
      definition - the definition to check
      Returns:
      true if the definition should be inlined, false otherwise
    • flushWriter

      void flushWriter() throws IOException
      Flush any buffered content to the underlying writer.
      Throws:
      IOException - if an I/O error occurs while flushing
    • getTypeNameForDefinition

      @NonNull String getTypeNameForDefinition(@NonNull IDefinition definition, @Nullable String suffix)
      Generate a type name for the provided definition with an optional suffix.
      Parameters:
      definition - the definition to generate a type name for
      suffix - an optional suffix to append to the type name, or null if no suffix is needed
      Returns:
      the generated type name
    • toCamelCase

      @NonNull static CharSequence toCamelCase(String text)
      Convert a text string to camel case by splitting on punctuation and capitalizing each segment.
      Parameters:
      text - the text to convert
      Returns:
      the camel case representation of the text