Class CheckpointState
- java.lang.Object
 - 
- jetbrains.mps.generator.impl.plan.CheckpointState
 
 
- 
public class CheckpointState extends Object
Keep information about mapping labels known at checkpoint step. CheckpointState represents state at a given Checkpoint. Model-wide state that records states for all checkpoints of the given model is accessible thoughModelCheckpoints- Since:
 - 3.3
 
 
- 
- 
Constructor Summary
Constructors Constructor Description CheckpointState(SModel checkpointModel, CheckpointIdentity prevCheckpoint, CheckpointIdentity cp) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CheckpointIdentitygetCheckpoint()SModelgetCheckpointModel()SNodegetCopiedOutput(SNode input)Collection<String>getMappingLabels()CheckpointIdentitygetOriginCheckpoint()Collection<SNode>getOutput(String mappingLabel, SNode input)SNodegetOutputIfSingle(String mappingLabel, SNode input)List<SNode>getOutputWithoutInput(String mappingLabel) 
 - 
 
- 
- 
Constructor Detail
- 
CheckpointState
public CheckpointState(@NotNull SModel checkpointModel, @Nullable CheckpointIdentity prevCheckpoint, @NotNull CheckpointIdentity cp)
 
 - 
 
- 
Method Detail
- 
getCheckpointModel
public SModel getCheckpointModel()
 
- 
getCheckpoint
public CheckpointIdentity getCheckpoint()
- Returns:
 - identity of a checkpoint for the model kept in this state.
 
 
- 
getOriginCheckpoint
@Nullable public CheckpointIdentity getOriginCheckpoint()
- Returns:
 - identity of a checkpoint model that served as an input to get this state's checkpoint model, or 
nullif there were no checkpoints during transformation prior tostate's checkpoint(i.e. original model served as an input) 
 
- 
getMappingLabels
@NotNull public Collection<String> getMappingLabels()
 
- 
getCopiedOutput
@Nullable public SNode getCopiedOutput(SNode input)
- Parameters:
 input- reference target that generally belongs to a preceding checkpoints (not necessarily immediate origin CP, though). In case model of input node is separated from CP of this state object by few other CPs, it's caller responsibility to walk them backwards. IMPORTANT: it's assumed this CP state is of the input node's model, i.e.crossModelEnv.getState(input.getModel()).find(==getCheckpoint())- Returns:
 nullif there's no node in this CP that records given node as it's origin.
 
- 
getOutput
@NotNull public Collection<SNode> getOutput(String mappingLabel, SNode input)
 
 - 
 
 -