edu.williams.cs.ljil.finitizer.actions
Class AppliedTransformationAction

java.lang.Object
  extended by edu.williams.cs.ljil.finitizer.Actionable
      extended by edu.williams.cs.ljil.finitizer.actions.ResolutionAction
          extended by edu.williams.cs.ljil.finitizer.actions.AppliedTransformationAction
Direct Known Subclasses:
InlineRecursionAction

public abstract class AppliedTransformationAction
extends ResolutionAction

Author:
shimon Abstract superclass for resolution actions that have an immediate consequence

Field Summary
protected  FSPBuilder fspb
          The main controller
protected  AppliedTransformation myAT
          An object recording the action taken so it can be undone later.
protected  laser.littlejil.AbstractStep poststep
          Step afte the transformation is applied.
protected  edu.williams.cs.ljil.fsp.StepRef prestep
          Step to which the transformation is applied
 
Constructor Summary
AppliedTransformationAction(FSPBuilder f, edu.williams.cs.ljil.fsp.StepRef s)
          Creates a transformation action.
 
Method Summary
 void apply()
          Applies a transformation
 void unapply()
          Undoes a transformation.
 
Methods inherited from class edu.williams.cs.ljil.finitizer.actions.ResolutionAction
ensureApplied, ensureUnapplied, getDescription, isApplied, toString
 
Methods inherited from class edu.williams.cs.ljil.finitizer.Actionable
addStateListener, addStateListenerRecursively, addSubAction, fireStateChanged, getParent, getSubActionAt, getSubActionCount, getSubActions, indexOf, isLeaf, isResolved, removeStateListener, setParent, unapplyAllSubActions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

prestep

protected final edu.williams.cs.ljil.fsp.StepRef prestep
Step to which the transformation is applied


poststep

protected laser.littlejil.AbstractStep poststep
Step afte the transformation is applied.


fspb

protected final FSPBuilder fspb
The main controller


myAT

protected AppliedTransformation myAT
An object recording the action taken so it can be undone later.

Constructor Detail

AppliedTransformationAction

public AppliedTransformationAction(FSPBuilder f,
                                   edu.williams.cs.ljil.fsp.StepRef s)
Creates a transformation action.

Parameters:
f - The main controller
s - The step that will be modifiied if the action is applied
Method Detail

apply

public void apply()
           throws java.lang.IllegalStateException
Applies a transformation

Overrides:
apply in class ResolutionAction
Throws:
java.lang.IllegalStateException

unapply

public void unapply()
Undoes a transformation. The transformation must have been applied previously.

Overrides:
unapply in class ResolutionAction