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.io.Serializable, java.lang.Cloneable, AmbNewArray, polyglot.ast.Ambiguous, polyglot.ast.Expr, polyglot.ast.ExprOps, polyglot.ast.Node, polyglot.ast.NodeOps, polyglot.ast.Prefix, polyglot.ast.Receiver, polyglot.ast.Term, polyglot.ast.TermOps, polyglot.ast.Typed, polyglot.util.Copy<polyglot.ast.Node>

      public class AmbNewArray_c
      extends polyglot.ast.Expr_c
      implements AmbNewArray

  An implementation of the `AmbNewArray` interface.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface polyglot.util.Copy

      `polyglot.util.Copy.Util`

    - ### Nested classes/interfaces inherited from interface polyglot.ast.Term

      `polyglot.ast.Term.Instance`

  - ### Field Summary

    Fields
    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.

    - ### 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

    Constructors
    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)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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> N` | `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> N` | `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> N` | `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> N` | `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.

    - ### Methods inherited from class polyglot.ast.Expr_c

      `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`

    - ### Methods inherited from class polyglot.ast.Term_c

      `exceptionCheck, exceptions, exceptions, exceptions, listChild, reachable, reachable, reachable`

    - ### Methods inherited from class polyglot.ast.Node_c

      `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`

    - ### 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

      `del, del, dump, error, error, ext, ext, ext, ext, isTypeChecked, position, position, visit, visitEdge`

    - ### Methods inherited from interface polyglot.ast.NodeOps

      `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`

    - ### 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`

- - ### Field Detail

    - #### 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<polyglot.ast.Expr> dims

    - #### addDims

          protected int addDims

  - ### Constructor Detail

    - #### AmbNewArray_c

          public 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

          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)

  - ### Method Detail

    - #### 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`

    - #### baseType

          protected <N extends AmbNewArray_c> N baseType(N n,
                                                         polyglot.ast.TypeNode baseType)

    - #### expr

          public java.lang.Object expr()

      Gets the expr.
      Specified by:
        `expr` in interface `AmbNewArray`
      Returns:
        either an Expr or a String

    - #### expr

          protected <N extends AmbNewArray_c> N expr(N n,
                                                     java.lang.Object expr)

    - #### dims

          public java.util.List<? extends polyglot.ast.Expr> dims()

      Gets the additional dimensions.
      Specified by:
        `dims` in interface `AmbNewArray`

    - #### dims

          public AmbNewArray dims(java.util.List<? extends polyglot.ast.Expr> dims)

      Returns a copy of this node with `dims` updated.
      Specified by:
        `dims` in interface `AmbNewArray`

    - #### dims

          protected <N extends AmbNewArray_c> N dims(N n,
                                                     java.util.List<? extends polyglot.ast.Expr> dims)

    - #### additionalDims

          public int additionalDims()

      Description copied from interface: `AmbNewArray`
      Gets the number of unspecified dimensions [] from an AmbNewArray representing T.a[e][m][][]...[]
      Specified by:
        `additionalDims` in interface `AmbNewArray`

    - #### additionalDims

          public AmbNewArray additionalDims(int addDims)

      Description copied from interface: `AmbNewArray`
      Returns a copy of this node with the number of unspecified dimensions updated.
      Specified by:
        `additionalDims` in interface `AmbNewArray`

    - #### reconstruct

          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)

      Reconstructs the node.

    - #### acceptCFG

          public <T> java.util.List<T> acceptCFG(polyglot.visit.CFGBuilder<?> v,
                                                 java.util.List<T> succs)

      Visit this term in evaluation order.
      Specified by:
        `acceptCFG` in interface `polyglot.ast.TermOps`
      Specified by:
        `acceptCFG` in class `polyglot.ast.Term_c`

    - #### firstChild

          public polyglot.ast.Term firstChild()

      Specified by:
        `firstChild` in interface `polyglot.ast.TermOps`
      Specified by:
        `firstChild` in class `polyglot.ast.Term_c`

    - #### 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`