|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectast.ASTNode
ast.Expr
ast.InstanceofExpr
public class InstanceofExpr
The InstanceofExpr class represents an instanceof expression. It contains a lefthand expression (expr), a righthand type name (type), and a flag indicating whether the instanceof is an upcheck (upcheck).
ASTNode
,
Expr
Field Summary | |
---|---|
protected Expr |
expr
The lefthand expression |
protected java.lang.String |
type
The righthand type |
protected boolean |
upcheck
Boolean indicating whether this is an upcheck (checking whether one type is instanceof a super type -- always true |
Fields inherited from class ast.ASTNode |
---|
charNum, lineNum, lineStr |
Constructor Summary | |
---|---|
InstanceofExpr(int lineNum,
Expr expr,
java.lang.String type)
InstanceofExpr constructor |
Method Summary | |
---|---|
java.lang.Object |
accept(visitor.Visitor v,
java.lang.Object o)
Visitor method |
Expr |
getExpr()
Get the lefthand expression |
java.lang.String |
getType()
Get the righthand type |
boolean |
getUpCheck()
Is this an upcheck? i.e., checking whether one type is an instanceof a super type (always true) |
void |
setUpCheck(boolean upcheck)
Set whether the instanceof is an upcheck i.e., checking whether one type is an instanceof a super type (always true) |
Methods inherited from class ast.Expr |
---|
getExprType, setExprType |
Methods inherited from class ast.ASTNode |
---|
getLineNum |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Expr expr
protected java.lang.String type
protected boolean upcheck
Constructor Detail |
---|
public InstanceofExpr(int lineNum, Expr expr, java.lang.String type)
lineNum
- source line number corresponding to this AST nodeexpr
- the lefthand expressiontype
- the righthand typeMethod Detail |
---|
public Expr getExpr()
public java.lang.String getType()
public boolean getUpCheck()
public void setUpCheck(boolean upcheck)
upcheck
- boolean indicating whether check is an upcheckpublic java.lang.Object accept(visitor.Visitor v, java.lang.Object o)
accept
in class Expr
v
- visitor objecto
- object to pass down
Visitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |