harpoon.Tools.PatMat
Class Spec.RuleStm

java.lang.Object
  extended by harpoon.Tools.PatMat.Spec.Rule
      extended by harpoon.Tools.PatMat.Spec.RuleStm
Enclosing class:
Spec

public static class Spec.RuleStm
extends Spec.Rule

Extension of Spec.Rule that also contains a Spec.Stm to match Tree statements.


Field Summary
 Spec.Stm stm
          Statement associated with this.
 
Fields inherited from class harpoon.Tools.PatMat.Spec.Rule
action_str, details
 
Constructor Summary
Spec.RuleStm(Spec.Stm stm, Spec.DetailList details, String action_str)
          Constructs a new Spec.RuleStm.
 
Method Summary
 void accept(Spec.RuleVisitor v)
          Applies v's visit method to this.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stm

public final Spec.Stm stm
Statement associated with this.

Constructor Detail

Spec.RuleStm

public Spec.RuleStm(Spec.Stm stm,
                    Spec.DetailList details,
                    String action_str)
Constructs a new Spec.RuleStm.
requires: action_str is a series of valid Java code statements.
effects: constructs a new Spec.RuleStm object with associated Spec.Stm, Spec.DetailList, and action to perform if this fires.

Parameters:
stm - Spec.Stm associated with this.
details - List of extra details associated with this (speed-cost, size-cost, predicates, etc.).
action_str - Series of Java code statements that represent the action to perform if this fires.
Method Detail

accept

public void accept(Spec.RuleVisitor v)
Description copied from class: Spec.Rule
Applies v's visit method to this. This is effectively a gludge to emulate multiple dispatch. Must be reimplemented by all subclasses of Spec.Rule.
effects: Calls v.visit(this).

Specified by:
accept in class Spec.Rule
See Also:
"Design Patterns pgs. 331-344"

toString

public String toString()
Overrides:
toString in class Spec.Rule