Class ChoiceNotInlineStrategy

java.lang.Object
dev.metaschema.schemagen.ChoiceNotInlineStrategy
All Implemented Interfaces:
IInlineStrategy

public class ChoiceNotInlineStrategy extends Object implements IInlineStrategy
An inline strategy that inlines definitions unless they are contained within a choice block.

Definitions that are part of a choice block are not inlined to ensure proper schema generation for mutually exclusive alternatives.

  • Constructor Details

    • ChoiceNotInlineStrategy

      public ChoiceNotInlineStrategy()
  • Method Details

    • isInline

      public boolean isInline(IDefinition definition, ModuleIndex metaschemaIndex)
      Description copied from interface: IInlineStrategy
      Determine if the provided definition should be inlined in the generated schema.
      Specified by:
      isInline in interface IInlineStrategy
      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