edu.williams.cs.ljil.finitizer.actions.recursion
Class InlineRecursionAction

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
              extended by edu.williams.cs.ljil.finitizer.actions.recursion.InlineRecursionAction

public class InlineRecursionAction
extends AppliedTransformationAction

An action that will inline a recursive step when it is applied.

Author:
Shimon Rura and Barbara Lerner

Field Summary
protected  laser.littlejil.AbstractBinding addedBinding
          The binding connecting the root of the inlined subtree to the rest of the process.
protected  laser.littlejil.AbstractStep addedStep
          The root of the tree that is inlined
 
Fields inherited from class edu.williams.cs.ljil.finitizer.actions.AppliedTransformationAction
fspb, myAT, poststep, prestep
 
Constructor Summary
InlineRecursionAction(FSPBuilder f, edu.williams.cs.ljil.fsp.StepRef s)
          Creates an action that will inline a reference step when it is applied.
 
Method Summary
 void apply()
          Inlines a step.
 java.lang.String getDescription()
          Returns a brief description of this action.
 void unapply()
          Undo the inlining.
 
Methods inherited from class edu.williams.cs.ljil.finitizer.actions.ResolutionAction
ensureApplied, ensureUnapplied, 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

addedStep

protected laser.littlejil.AbstractStep addedStep
The root of the tree that is inlined


addedBinding

protected laser.littlejil.AbstractBinding addedBinding
The binding connecting the root of the inlined subtree to the rest of the process.

Constructor Detail

InlineRecursionAction

public InlineRecursionAction(FSPBuilder f,
                             edu.williams.cs.ljil.fsp.StepRef s)
Creates an action that will inline a reference step when it is applied.

Parameters:
f - The main controller
s - The step to be replaced by the inlining.
Method Detail

apply

public void apply()
           throws java.lang.IllegalStateException
Inlines a step.

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

unapply

public void unapply()
Undo the inlining.

Overrides:
unapply in class AppliedTransformationAction

getDescription

public java.lang.String getDescription()
Returns a brief description of this action.

Specified by:
getDescription in class ResolutionAction