Interface ElementCreationCommand

All Superinterfaces:
Command, ElementView
All Known Implementing Classes:
CreateAbstractSupport, CreateConclusion, CreateEvidence, CreateStrategy, CreateSubConclusion

public sealed interface ElementCreationCommand extends Command, ElementView
Sealed interface common to all element-creation commands.

Provides uniform access to the three fields shared by every element-creation command (container, identifier, label) and a withId(String) factory that copies the command with a different identifier. This eliminates repetitive instanceof chains in code that processes creation commands generically (e.g. Unifier).

Also implements ElementView so that equivalence relations and partition utilities can operate on commands directly, without wrapping them in live model objects.

  • Method Details

    • container

      String container()
      Name of the model this command adds an element to.
    • identifier

      String identifier()
      Id assigned to the new element.
    • id

      default String id()
      Unique identifier of this element within its containing model.

      Delegates to identifier() so that ElementView callers see the same value as domain code that uses identifier().

      Specified by:
      id in interface ElementView
    • label

      String label()
      Display label of the new element.
      Specified by:
      label in interface ElementView
    • location

      SourceLocation location()
      Source location of the element declaration.
    • withId

      Returns a copy of this command with newId as the element identifier. The container, label, and location are preserved.