harpoon.Tools.PatMat
Class Spec.Exp

java.lang.Object
  extended by harpoon.Tools.PatMat.Spec.Exp
Direct Known Subclasses:
Spec.ExpBinop, Spec.ExpConst, Spec.ExpId, Spec.ExpMem, Spec.ExpName, Spec.ExpTemp, Spec.ExpUnop
Enclosing class:
Spec

public abstract static class Spec.Exp
extends Object

Abstract immutable representation of an Expression in an Instruction Pattern.

See Also:
Exp

Constructor Summary
Spec.Exp()
           
 
Method Summary
abstract  void accept(Spec.ExpVisitor v)
          Applies v's visit method to this.
abstract  Spec.Exp build(Spec.ExpList kids)
          Creates a new Spec.Exp similar to this one, using the provided Spec.ExpList of children.
abstract  Spec.ExpList kids()
          Creates an Spec.ExpList of children of this Spec.Exp.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Spec.Exp

public Spec.Exp()
Method Detail

accept

public abstract void accept(Spec.ExpVisitor 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.Exp.
effects: Calls v.visit(this).

See Also:
"Design Patterns pgs. 331-344"

build

public abstract Spec.Exp build(Spec.ExpList kids)
Creates a new Spec.Exp similar to this one, using the provided Spec.ExpList of children.


kids

public abstract Spec.ExpList kids()
Creates an Spec.ExpList of children of this Spec.Exp.