|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Tools.PatMat.Spec.Rule
public abstract static class Spec.Rule
Abstract immutable representation of an Instruction Pattern.
Contains a Spec.DetailList
and a series of Java
code statements.
Field Summary | |
---|---|
String |
action_str
Java code to execute if this fires (ie. this
pattern is chosen as part of the optimal set). |
Spec.DetailList |
details
List of the extra details associated with this (speed-cost, size-cost, predicates, etc.). |
Constructor Summary | |
---|---|
Spec.Rule(Spec.DetailList details,
String action_str)
Constructs a new Spec.Rule . |
Method Summary | |
---|---|
abstract 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 |
---|
public final Spec.DetailList details
this
(speed-cost, size-cost, predicates, etc.).
null
is a legal value.
public final String action_str
this
fires (ie. this
pattern is chosen as part of the optimal set).
Constructor Detail |
---|
public Spec.Rule(Spec.DetailList details, String action_str)
Spec.Rule
.
action_str
is a series of valid Java
code statements.
Spec.Rule
object with
associated Spec.DetailList
and action to
perform if this
fires.
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 |
---|
public abstract void accept(Spec.RuleVisitor v)
v
's visit
method to
this
. This is effectively a gludge to
emulate multiple dispatch. Must be reimplemented
by all subclasses of Spec.Rule
.
v.visit(this)
.
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |