public class JL5NewExt extends JL5ProcedureCallExt implements NewOps
typeArgs| Constructor and Description |
|---|
JL5NewExt() |
JL5NewExt(java.util.List<TypeNode> typeArgs) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
constantValue(Lang lang)
Return the constant value of the expression, if any.
|
boolean |
constantValueSet(Lang lang)
Return true iff the compiler has determined whether this expression has a
constant value.
|
Node |
disambiguateOverride(Node parent,
AmbiguityRemover ar)
Disambiguate the AST.
|
ClassType |
findEnclosingClass(Context c,
ClassType ct) |
TypeNode |
findQualifiedTypeNode(AmbiguityRemover ar,
ClassType outer,
TypeNode objectType) |
Expr |
findQualifier(AmbiguityRemover ar,
ClassType ct) |
boolean |
isConstant(Lang lang)
Return whether the expression evaluates to a constant.
|
New |
node()
The node we ultimately extend.
|
void |
prettyPrint(CodeWriter w,
PrettyPrinter tr)
Pretty-print the AST using the given
CodeWriter. |
void |
printBody(CodeWriter w,
PrettyPrinter tr) |
void |
printQualifier(CodeWriter w,
PrettyPrinter tr) |
void |
printShortObjectType(CodeWriter w,
PrettyPrinter tr) |
Node |
typeCheck(TypeChecker tc)
Type check the AST.
|
void |
typeCheckFlags(TypeChecker tc) |
void |
typeCheckNested(TypeChecker tc) |
actualTypeArgs, printArgs, typeArgs, typeArgs, typeArgs, visitChildrenacceptCFG, firstChildaddDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, copy, disambiguate, disambiguateEnter, dump, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, ext, ext, extRewrite, extRewriteEnter, init, initPred, pred, prettyPrint, prettyPrint, prettyPrint, prettyPrint, print, printBlock, printSubStmt, superLang, throwTypes, toString, typeCheckEnter, typeCheckOverride, visitChild, visitListclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitprintArgspublic JL5NewExt()
public JL5NewExt(java.util.List<TypeNode> typeArgs)
public New node()
Extnode in interface Extnode in class JL5ProcedureCallExtpublic Node disambiguateOverride(Node parent, AmbiguityRemover ar) throws SemanticException
NodeOpsoverride() method of the
visitor. If this method returns non-null, the node's children
will not be visited automatically. Thus, the method should check
both the node this and it's children, usually by
invoking visitChildren with tc or
with another visitor, returning a non-null node. OR, the method
should do nothing and simply return null to allow
enter, visitChildren, and leave
to be invoked on the node.
The default implementation returns null.
Overriding of this method is discouraged, but sometimes necessary.disambiguateOverride in interface NodeOpsdisambiguateOverride in class Ext_car - The visitor which disambiguates.SemanticExceptionpublic TypeNode findQualifiedTypeNode(AmbiguityRemover ar, ClassType outer, TypeNode objectType) throws SemanticException
findQualifiedTypeNode in interface NewOpsSemanticExceptionpublic Expr findQualifier(AmbiguityRemover ar, ClassType ct) throws SemanticException
findQualifier in interface NewOpsSemanticExceptionpublic Node typeCheck(TypeChecker tc) throws SemanticException
NodeOpsleave() method of the
visitor. The method should perform work that should be done
after visiting the children of the node. The method may return
this or a new copy of the node which will be
installed as a child of the node's parent.typeCheck in interface NodeOpstypeCheck in class Ext_ctc - The type checking visitor.SemanticExceptionpublic void prettyPrint(CodeWriter w, PrettyPrinter tr)
NodeOpsCodeWriter.prettyPrint in interface NodeOpsprettyPrint in class JL5ProcedureCallExtw - The code writer to which to write.tr - The pretty printer. This is not a visitor.public ClassType findEnclosingClass(Context c, ClassType ct)
findEnclosingClass in interface NewOpspublic void typeCheckFlags(TypeChecker tc) throws SemanticException
typeCheckFlags in interface NewOpsSemanticExceptionpublic void typeCheckNested(TypeChecker tc) throws SemanticException
typeCheckNested in interface NewOpsSemanticExceptionpublic void printQualifier(CodeWriter w, PrettyPrinter tr)
printQualifier in interface NewOpspublic void printShortObjectType(CodeWriter w, PrettyPrinter tr)
printShortObjectType in interface NewOpspublic void printBody(CodeWriter w, PrettyPrinter tr)
public boolean constantValueSet(Lang lang)
ExprOpsisConstant() is valid only if
constantValueSet() is true.constantValueSet in interface ExprOpspublic boolean isConstant(Lang lang)
ExprOpsconstantValueSet() is true.isConstant in interface ExprOpspublic java.lang.Object constantValue(Lang lang)
ExprOpsisConstant() is true.constantValue in interface ExprOps