harpoon.Tools.PatMat
Class Spec.RuleStm
java.lang.Object
harpoon.Tools.PatMat.Spec.Rule
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 . |
stm
public final Spec.Stm stm
- Statement associated with
this
.
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.
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