Class ArrayCreation

java.lang.Object

public class ArrayCreation extends Expression
Array creation expression AST node type.
 ArrayCreation:
    new PrimitiveType [ Expression ] { [ Expression ] } { [ ] }
    new TypeName [ < Type { , Type } > ]
        [ Expression ] { [ Expression ] } { [ ] }
    new PrimitiveType [ ] { [ ] } ArrayInitializer
    new TypeName [ < Type { , Type } > ]
        [ ] { [ ] } ArrayInitializer
 

The mapping from Java language syntax to AST nodes is as follows:

  • the type node is the array type of the creation expression, with one level of array per set of square brackets,
  • the dimension expressions are collected into the dimensions list.
Since:
2.0