jltools.ext.jl.ast
Class Instanceof_c
java.lang.Object
|
+--jltools.ext.jl.ast.Node_c
|
+--jltools.ext.jl.ast.Expr_c
|
+--jltools.ext.jl.ast.Instanceof_c
- All Implemented Interfaces:
- java.lang.Cloneable, Copy, Expr, Instanceof, Node, Prefix, Receiver, java.io.Serializable, Typed
- public class Instanceof_c
- extends Expr_c
- implements Instanceof
An Instanceof
is an immutable representation of
the use of the instanceof
operator.
- See Also:
- Serialized Form
Fields inherited from class jltools.ext.jl.ast.Expr_c |
type |
Methods inherited from class jltools.ext.jl.ast.Node_c |
buildTypes, buildTypesOverride_, buildTypesOverride, copy, disambiguate_, disambiguate, disambiguateOverride_, disambiguateOverride, disambiguateTypes_, disambiguateTypes, disambiguateTypesOverride_, disambiguateTypesOverride, enterScope, exceptionCheck_, exceptionCheck, exceptionCheckOverride_, exceptionCheckOverride, ext, ext, foldConstants_, foldConstants, foldConstantsOverride_, foldConstantsOverride, leaveScope, position, position, reconstructTypes, translate, translateBlock, translateSubstmt, typeCheck, typeCheckOverride_, typeCheckOverride, visit, visitList |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jltools.ast.Expr |
type |
Methods inherited from interface jltools.ast.Node |
buildTypes_, buildTypesOverride_, copy, disambiguate_, disambiguateOverride_, disambiguateTypes_, disambiguateTypesOverride_, dump, enterScope, exceptionCheck_, exceptionCheckOverride_, ext, ext, foldConstants_, foldConstantsOverride_, leaveScope, position, position, reconstructTypes_, typeCheckOverride_, visit |
Methods inherited from interface jltools.ast.Typed |
type |
expr
protected Expr expr
compareType
protected TypeNode compareType
Instanceof_c
public Instanceof_c(Ext ext,
Position pos,
Expr expr,
TypeNode compareType)
precedence
public Precedence precedence()
- Get the precedence of the expression.
- Specified by:
precedence
in interface Expr
- Overrides:
precedence
in class Expr_c
expr
public Expr expr()
- Get the expression to be tested.
- Specified by:
expr
in interface Instanceof
expr
public Instanceof expr(Expr expr)
- Set the expression to be tested.
- Specified by:
expr
in interface Instanceof
compareType
public TypeNode compareType()
- Get the type to be compared against.
- Specified by:
compareType
in interface Instanceof
compareType
public Instanceof compareType(TypeNode compareType)
- Set the type to be compared against.
- Specified by:
compareType
in interface Instanceof
reconstruct
protected Instanceof_c reconstruct(Expr expr,
TypeNode compareType)
- Reconstruct the expression.
visitChildren
public Node visitChildren(NodeVisitor v)
- Visit the children of the expression.
- Specified by:
visitChildren
in interface Node
- Overrides:
visitChildren
in class Node_c
typeCheck_
public Node typeCheck_(TypeChecker tc)
throws SemanticException
- Type check the expression.
- Specified by:
typeCheck_
in interface Node
- Overrides:
typeCheck_
in class Node_c
toString
public java.lang.String toString()
- Overrides:
toString
in class Node_c
translate_
public void translate_(CodeWriter w,
Translator tr)
- Write the expression to an output file.
- Specified by:
translate_
in interface Node
- Overrides:
translate_
in class Node_c
- Following copied from interface:
jltools.ast.Node
- Parameters:
w
- The code writer to which to write.tr
- The translation pass. This is not a visitor.