harpoon.Tools.PatMat
Class Spec.LeafOp

java.lang.Object
  extended by harpoon.Tools.PatMat.Spec.Leaf
      extended by harpoon.Tools.PatMat.Spec.LeafOp
Enclosing class:
Spec

public static class Spec.LeafOp
extends Spec.Leaf

Extension of Spec.Leaf representing an opcode for Uop and/or Bop.


Field Summary
 int op
           
 
Constructor Summary
Spec.LeafOp(int op)
          Constructs a new Spec.LeafOp.
 
Method Summary
 void accept(Spec.LeafVisitor v)
          Applies v's visit method to this.
 String toBop()
           
 String toString()
           
 String toUop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

op

public final int op
Constructor Detail

Spec.LeafOp

public Spec.LeafOp(int op)
Constructs a new Spec.LeafOp.

Parameters:
op - Enumerated opcode.
Method Detail

toString

public String toString()
Overrides:
toString in class Object

toBop

public String toBop()
Overrides:
toBop in class Spec.Leaf

toUop

public String toUop()
Overrides:
toUop in class Spec.Leaf

accept

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

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