Interface ElementCreationCommand
- All Superinterfaces:
Command, ElementView
- All Known Implementing Classes:
CreateAbstractSupport, CreateConclusion, CreateEvidence, CreateStrategy, CreateSubConclusion
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 Summary
Modifier and TypeMethodDescriptionName of the model this command adds an element to.default Stringid()Unique identifier of this element within its containing model.Id assigned to the new element.label()Display label of the new element.location()Source location of the element declaration.Returns a copy of this command withnewIdas the element identifier.
-
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
Unique identifier of this element within its containing model.Delegates to
identifier()so thatElementViewcallers see the same value as domain code that usesidentifier().- Specified by:
idin interfaceElementView
-
label
-
location
SourceLocation location()Source location of the element declaration. -
withId
Returns a copy of this command withnewIdas the element identifier. The container, label, and location are preserved.
-