public class AmbNewArray_c extends polyglot.ast.Expr_c implements AmbNewArray
AmbNewArray
interface.Modifier and Type | Field and Description |
---|---|
protected int |
addDims |
protected polyglot.ast.TypeNode |
baseType |
protected java.util.List<polyglot.ast.Expr> |
dims |
protected java.lang.Object |
expr
The ambiguous expr.
|
Constructor and Description |
---|
AmbNewArray_c(polyglot.util.Position pos,
polyglot.ast.TypeNode baseType,
java.lang.Object expr,
java.util.List<polyglot.ast.Expr> dims,
int addDims) |
AmbNewArray_c(polyglot.util.Position pos,
polyglot.ast.TypeNode baseType,
java.lang.Object expr,
java.util.List<polyglot.ast.Expr> dims,
int addDims,
polyglot.ast.Ext ext) |
Modifier and Type | Method and Description |
---|---|
<T> java.util.List<T> |
acceptCFG(polyglot.visit.CFGBuilder<?> v,
java.util.List<T> succs)
Visit this term in evaluation order.
|
int |
additionalDims()
Gets the number of unspecified dimensions [] from an AmbNewArray representing T.a[e][m][][]...[]
|
AmbNewArray |
additionalDims(int addDims)
Returns a copy of this node with the number of unspecified dimensions updated.
|
polyglot.ast.TypeNode |
baseType()
Gets the base type.
|
protected <N extends AmbNewArray_c> |
baseType(N n,
polyglot.ast.TypeNode baseType) |
AmbNewArray |
baseType(polyglot.ast.TypeNode baseType)
Returns a copy of this node with
baseType updated. |
java.util.List<? extends polyglot.ast.Expr> |
dims()
Gets the additional dimensions.
|
AmbNewArray |
dims(java.util.List<? extends polyglot.ast.Expr> dims)
Returns a copy of this node with
dims updated. |
protected <N extends AmbNewArray_c> |
dims(N n,
java.util.List<? extends polyglot.ast.Expr> dims) |
polyglot.ast.Node |
disambiguate(polyglot.visit.AmbiguityRemover ar)
Disambiguates
|
java.lang.Object |
expr()
Gets the expr.
|
protected <N extends AmbNewArray_c> |
expr(N n,
java.lang.Object expr) |
polyglot.ast.Term |
firstChild() |
boolean |
isDisambiguated() |
void |
prettyPrint(polyglot.util.CodeWriter w,
polyglot.visit.PrettyPrinter tr) |
protected <N extends AmbNewArray_c> |
reconstruct(N n,
polyglot.ast.TypeNode baseType,
java.lang.Object expr,
java.util.List<? extends polyglot.ast.Expr> dims)
Reconstructs the node.
|
java.lang.String |
toString() |
polyglot.ast.Node |
visitChildren(polyglot.visit.NodeVisitor v)
Visits the children of this node.
|
booleanValue, buildTypes, byteValue, charValue, constantValue, constantValue, constantValueSet, constantValueSet, doubleValue, dump, extRewrite, floatValue, intValue, isConstant, isConstant, isTypeChecked, lastLang, longValue, precedence, printSubExpr, printSubExpr, shortValue, stringValue, type, type, type
exceptionCheck, exceptions, exceptions, exceptions, listChild, reachable, reachable, reachable
addDecls, buildTypesEnter, checkConstants, childExpectedType, copy, copy, copy, copyIfNeeded, del, del, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, error, error, error, exceptionCheckEnter, ext, ext, ext, ext, extRewriteEnter, extRewriteOverride, lang, position, position, position, prettyPrint, prettyPrint, prettyPrint, prettyPrint, print, printBlock, printSubStmt, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
constantValue, constantValueSet, isConstant, precedence, printSubExpr, printSubExpr, type
del, del, dump, error, error, ext, ext, ext, ext, isTypeChecked, position, position, visit, visitEdge
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, extRewrite, extRewriteEnter, extRewriteOverride, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChild, visitList
protected polyglot.ast.TypeNode baseType
protected java.lang.Object expr
protected java.util.List<polyglot.ast.Expr> dims
protected int addDims
public AmbNewArray_c(polyglot.util.Position pos, polyglot.ast.TypeNode baseType, java.lang.Object expr, java.util.List<polyglot.ast.Expr> dims, int addDims)
public AmbNewArray_c(polyglot.util.Position pos, polyglot.ast.TypeNode baseType, java.lang.Object expr, java.util.List<polyglot.ast.Expr> dims, int addDims, polyglot.ast.Ext ext)
public boolean isDisambiguated()
isDisambiguated
in interface polyglot.ast.Node
isDisambiguated
in class polyglot.ast.Node_c
public polyglot.ast.TypeNode baseType()
baseType
in interface AmbNewArray
public AmbNewArray baseType(polyglot.ast.TypeNode baseType)
baseType
updated.baseType
in interface AmbNewArray
protected <N extends AmbNewArray_c> N baseType(N n, polyglot.ast.TypeNode baseType)
public java.lang.Object expr()
expr
in interface AmbNewArray
protected <N extends AmbNewArray_c> N expr(N n, java.lang.Object expr)
public java.util.List<? extends polyglot.ast.Expr> dims()
dims
in interface AmbNewArray
public AmbNewArray dims(java.util.List<? extends polyglot.ast.Expr> dims)
dims
updated.dims
in interface AmbNewArray
protected <N extends AmbNewArray_c> N dims(N n, java.util.List<? extends polyglot.ast.Expr> dims)
public int additionalDims()
AmbNewArray
additionalDims
in interface AmbNewArray
public AmbNewArray additionalDims(int addDims)
AmbNewArray
additionalDims
in interface AmbNewArray
protected <N extends AmbNewArray_c> N reconstruct(N n, polyglot.ast.TypeNode baseType, java.lang.Object expr, java.util.List<? extends polyglot.ast.Expr> dims)
public <T> java.util.List<T> acceptCFG(polyglot.visit.CFGBuilder<?> v, java.util.List<T> succs)
acceptCFG
in interface polyglot.ast.TermOps
acceptCFG
in class polyglot.ast.Term_c
public polyglot.ast.Term firstChild()
firstChild
in interface polyglot.ast.TermOps
firstChild
in class polyglot.ast.Term_c
public polyglot.ast.Node visitChildren(polyglot.visit.NodeVisitor v)
visitChildren
in interface polyglot.ast.NodeOps
visitChildren
in class polyglot.ast.Node_c
public java.lang.String toString()
toString
in class polyglot.ast.Node_c
public polyglot.ast.Node disambiguate(polyglot.visit.AmbiguityRemover ar) throws polyglot.types.SemanticException
disambiguate
in interface polyglot.ast.NodeOps
disambiguate
in class polyglot.ast.Node_c
polyglot.types.SemanticException
public void prettyPrint(polyglot.util.CodeWriter w, polyglot.visit.PrettyPrinter tr)
prettyPrint
in interface polyglot.ast.NodeOps
prettyPrint
in class polyglot.ast.Node_c