Modifier and Type | Field and Description |
---|---|
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
|
Constructor and Description |
---|
InstanceofExpr(int lineNum,
Expr expr,
java.lang.String type)
InstanceofExpr constructor
|
Modifier and Type | Method and Description |
---|---|
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?
|
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)
|
getExprType, setExprType
getLineNum
protected Expr expr
protected java.lang.String type
protected boolean upcheck
public InstanceofExpr(int lineNum, Expr expr, java.lang.String type)
lineNum
- source line number corresponding to this AST nodeexpr
- the lefthand expressiontype
- the righthand typepublic Expr getExpr()
public java.lang.String getType()
public boolean getUpCheck()
public void setUpCheck(boolean upcheck)
upcheck
- boolean indicating whether check is an upcheck