|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HandlerExpr
This interface is implemented by Attribute Handlers; provides services for the Attribute Manager. It is used in the "SymbolTable".
SymbolTable
Field Summary | |
---|---|
static long |
serialVersionUID
|
Method Summary | |
---|---|
void |
check(SymbolTable symTab)
Type-check the expression under a given symbol table with declarations. |
boolean |
equals(HandlerExpr testObject)
|
void |
evaluate(SymbolTable symTab)
Evaluate the expression under a given symbol table containing variable declarations and (hopefully) also the assignments. |
void |
getAllVariables(java.util.Vector<java.lang.String> v)
fills the vector with the names of all variables which occur in this expression |
Node |
getAST()
Returns the abstract syntax tree which represents the expression |
HandlerExpr |
getCopy()
Obtaining a copy of the message receiving expression. |
java.lang.String |
getString()
returns the string representation of an expression |
java.lang.Object |
getValue()
Obtaining the value. |
boolean |
isComplex()
Checks if the expression is a complex one (like x+1). |
boolean |
isConstant()
Checks if the expression is constant. |
boolean |
isUnifiableWith(HandlerExpr expr,
SymbolTable symTab)
Checks if the recipient can be "matched", "unified" with the first parameter under a certain variable assignment. |
boolean |
isVariable()
Checks if the expression is a single Variable. |
java.lang.String |
toString()
|
Field Detail |
---|
static final long serialVersionUID
Method Detail |
---|
java.lang.String toString()
toString
in class java.lang.Object
java.lang.Object getValue()
HandlerExpr getCopy()
void check(SymbolTable symTab) throws AttrHandlerException
symTab
- the declaration Table to use for the checking
AttrHandlerException
- if the checking yields an inconsitency. An exception is
preferred over a return value as it is a ready-to-use
propagation mechanism with specific information easily
attached.void evaluate(SymbolTable symTab) throws AttrHandlerException
symTab
- the declaration Table to use for the evaluation
AttrHandlerException
- if the evaluation yields an error (a missing value for a
variable etc.)java.lang.String getString()
boolean isConstant()
boolean isVariable()
boolean isComplex()
boolean equals(HandlerExpr testObject)
boolean isUnifiableWith(HandlerExpr expr, SymbolTable symTab)
expr
- The expression to check if unifiable with;symTab
- Contains the variable assignments under which to perform the
test.
Node getAST()
void getAllVariables(java.util.Vector<java.lang.String> v)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |