Interface IInlineStrategy

All Known Implementing Classes:
ChoiceNotInlineStrategy
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

A strategy for determining whether a definition should be inlined in the generated schema or referenced as a separate type definition.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final IInlineStrategy
    A strategy that inlines definitions unless they are used in a choice group.
    static final IInlineStrategy
    A strategy that inlines definitions based on their IDefinition.isInline() property.
    static final IInlineStrategy
    A strategy that never inlines any definition.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isInline(dev.metaschema.core.model.IDefinition definition, ModuleIndex metaschemaIndex)
    Determine if the provided definition should be inlined in the generated schema.
    newInlineStrategy(dev.metaschema.core.configuration.IConfiguration<SchemaGenerationFeature<?>> configuration)
    Create a new inline strategy based on the provided configuration.
  • Field Details

  • Method Details

    • newInlineStrategy

      @NonNull static IInlineStrategy newInlineStrategy(@NonNull dev.metaschema.core.configuration.IConfiguration<SchemaGenerationFeature<?>> configuration)
      Create a new inline strategy based on the provided configuration.
      Parameters:
      configuration - the schema generation configuration
      Returns:
      the appropriate inline strategy based on the configuration settings
    • isInline

      boolean isInline(@NonNull dev.metaschema.core.model.IDefinition definition, @NonNull ModuleIndex metaschemaIndex)
      Determine if the provided definition should be inlined in the generated schema.
      Parameters:
      definition - the definition to check
      metaschemaIndex - the module index containing definition usage information
      Returns:
      true if the definition should be inlined, false if it should be referenced as a separate type