jif.ast
Class AmbNewArray_c
java.lang.Object
polyglot.ast.Node_c
polyglot.ast.Term_c
polyglot.ast.Expr_c
jif.ast.AmbNewArray_c
- All Implemented Interfaces:
- java.lang.Cloneable, AmbNewArray, polyglot.ast.Ambiguous, polyglot.ast.Expr, polyglot.ast.JL, polyglot.ast.Node, polyglot.ast.NodeOps, polyglot.ast.Prefix, polyglot.ast.Receiver, polyglot.ast.Term, polyglot.ast.Typed, polyglot.util.Copy
public class AmbNewArray_c
- extends polyglot.ast.Expr_c
- implements AmbNewArray
An implementation of the AmbNewArray interface.
|
Field Summary |
protected int |
addDims
|
protected polyglot.ast.TypeNode |
baseType
|
protected java.util.List |
dims
|
protected java.lang.Object |
expr
The ambiguous expr. |
| Fields inherited from class polyglot.ast.Expr_c |
type |
| Fields inherited from class polyglot.ast.Term_c |
exceptions, reachable |
| Fields inherited from class polyglot.ast.Node_c |
del, error, ext, position |
| Fields inherited from interface polyglot.ast.Term |
ENTRY, EXIT |
|
Constructor Summary |
AmbNewArray_c(polyglot.util.Position pos,
polyglot.ast.TypeNode baseType,
java.lang.Object expr,
java.util.List dims,
int addDims)
|
|
Method Summary |
java.util.List |
acceptCFG(polyglot.visit.CFGBuilder v,
java.util.List succs)
Visit this term in evaluation order. |
polyglot.ast.TypeNode |
baseType()
Gets the base type. |
AmbNewArray |
baseType(polyglot.ast.TypeNode baseType)
Returns a copy of this node with baseType updated. |
java.util.List |
dims()
Gets the additional dimensions. |
AmbNewArray |
dims(java.util.List dims)
Returns a copy of this node with dims updated. |
polyglot.ast.Node |
disambiguate(polyglot.visit.AmbiguityRemover ar)
Disambiguates |
java.lang.Object |
expr()
Gets the expr. |
polyglot.ast.Term |
firstChild()
|
boolean |
isDisambiguated()
|
void |
prettyPrint(polyglot.util.CodeWriter w,
polyglot.visit.PrettyPrinter tr)
|
protected AmbNewArray_c |
reconstruct(polyglot.ast.TypeNode baseType,
java.lang.Object expr,
java.util.List dims)
Reconstructs the node. |
java.lang.String |
toString()
|
polyglot.ast.Node |
visitChildren(polyglot.visit.NodeVisitor v)
Visits the children of this node. |
| Methods inherited from class polyglot.ast.Expr_c |
booleanValue, buildTypes, byteValue, charValue, constantValue, constantValueSet, doubleValue, dump, floatValue, intValue, isConstant, isTypeChecked, longValue, precedence, printSubExpr, printSubExpr, shortValue, stringValue, type, type |
| Methods inherited from class polyglot.ast.Term_c |
exceptionCheck, exceptions, exceptions, listChild, reachable, reachable |
| Methods inherited from class polyglot.ast.Node_c |
addDecls, buildTypesEnter, checkConstants, childExpectedType, copy, copy, copy, del, del, disambiguateEnter, disambiguateOverride, dump, dump, enterChildScope, enterScope, error, error, exceptionCheckEnter, ext, ext, ext, ext, init, node, position, position, prettyPrint, prettyPrint, print, printBlock, printSubStmt, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitList |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface polyglot.ast.Expr |
constantValue, constantValueSet, isConstant, precedence, printSubExpr, printSubExpr, type |
| Methods inherited from interface polyglot.ast.Node |
childExpectedType, del, del, dump, error, error, ext, ext, ext, ext, isTypeChecked, position, position, visit, visitChild, visitEdge, visitList |
| Methods inherited from interface polyglot.ast.JL |
init, node |
| Methods inherited from interface polyglot.ast.NodeOps |
addDecls, buildTypes, buildTypesEnter, checkConstants, copy, copy, disambiguateEnter, disambiguateOverride, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride |
| Methods inherited from interface polyglot.util.Copy |
copy |
| Methods inherited from interface polyglot.ast.Typed |
type |
| Methods inherited from interface polyglot.ast.Term |
exceptions, exceptions, reachable, reachable |
baseType
protected polyglot.ast.TypeNode baseType
expr
protected java.lang.Object expr
- The ambiguous expr. May be a parameter or an array dimension.
dims
protected java.util.List dims
addDims
protected int addDims
AmbNewArray_c
public AmbNewArray_c(polyglot.util.Position pos,
polyglot.ast.TypeNode baseType,
java.lang.Object expr,
java.util.List dims,
int addDims)
isDisambiguated
public boolean isDisambiguated()
- Specified by:
isDisambiguated in interface polyglot.ast.Node- Overrides:
isDisambiguated in class polyglot.ast.Node_c
baseType
public polyglot.ast.TypeNode baseType()
- Gets the base type.
- Specified by:
baseType in interface AmbNewArray
baseType
public AmbNewArray baseType(polyglot.ast.TypeNode baseType)
- Returns a copy of this node with
baseType updated.
- Specified by:
baseType in interface AmbNewArray
expr
public java.lang.Object expr()
- Gets the expr.
- Specified by:
expr in interface AmbNewArray
dims
public java.util.List dims()
- Gets the additional dimensions.
- Specified by:
dims in interface AmbNewArray
dims
public AmbNewArray dims(java.util.List dims)
- Returns a copy of this node with
dims updated.
- Specified by:
dims in interface AmbNewArray
reconstruct
protected AmbNewArray_c reconstruct(polyglot.ast.TypeNode baseType,
java.lang.Object expr,
java.util.List dims)
- Reconstructs the node.
acceptCFG
public java.util.List acceptCFG(polyglot.visit.CFGBuilder v,
java.util.List succs)
- Visit this term in evaluation order.
- Specified by:
acceptCFG in interface polyglot.ast.Term- Specified by:
acceptCFG in class polyglot.ast.Term_c
firstChild
public polyglot.ast.Term firstChild()
- Specified by:
firstChild in interface polyglot.ast.Term
visitChildren
public polyglot.ast.Node visitChildren(polyglot.visit.NodeVisitor v)
- Visits the children of this node.
- Specified by:
visitChildren in interface polyglot.ast.NodeOps- Overrides:
visitChildren in class polyglot.ast.Node_c
toString
public java.lang.String toString()
- Overrides:
toString in class polyglot.ast.Node_c
disambiguate
public polyglot.ast.Node disambiguate(polyglot.visit.AmbiguityRemover ar)
throws polyglot.types.SemanticException
- Disambiguates
- Specified by:
disambiguate in interface polyglot.ast.NodeOps- Overrides:
disambiguate in class polyglot.ast.Node_c
- Throws:
polyglot.types.SemanticException
prettyPrint
public void prettyPrint(polyglot.util.CodeWriter w,
polyglot.visit.PrettyPrinter tr)
- Specified by:
prettyPrint in interface polyglot.ast.NodeOps- Overrides:
prettyPrint in class polyglot.ast.Node_c