APIdia Launch Partner
Top Description Methods
com.sun.source.tree

public Interface NewArrayTree

extends ExpressionTree
Known Direct Implementers
com.sun.tools.javac.tree.JCTree.JCNewArray
Imports
java.util.List

A tree node for an expression to create a new instance of an array. For example:
  new type dimensions initializers

  new type dimensions [ ] initializers
Authors
Peter von der Ahé, Jonathan Gibbons
Since
1.6
Java Language Specification
15.10.1 Array Creation Expressions

Method Summary

Modifier and TypeMethod and Description
public List<? extends AnnotationTree>

Returns:

the annotations
getAnnotations
()

Returns the annotations on the base type.

public List<? extends List<? extends AnnotationTree>>

Returns:

the annotations on the dimensions expressions
getDimAnnotations
()

Returns the annotations on each of the dimension expressions.

public List<? extends ExpressionTree>

Returns:

the dimension expressions
getDimensions
()

Returns the dimension expressions for the type.

public List<? extends ExpressionTree>

Returns:

the initializer expressions
getInitializers
()

Returns the initializer expressions.

public Tree

Returns:

the base type
getType
()

Returns the base type of the expression.

Method Detail

getAnnotationsback to summary
public List<? extends AnnotationTree> getAnnotations()

Returns the annotations on the base type.

Returns:List<? extends AnnotationTree>

the annotations

getDimAnnotationsback to summary
public List<? extends List<? extends AnnotationTree>> getDimAnnotations()

Returns the annotations on each of the dimension expressions.

Returns:List<? extends List<? extends AnnotationTree>>

the annotations on the dimensions expressions

getDimensionsback to summary
public List<? extends ExpressionTree> getDimensions()

Returns the dimension expressions for the type.

Returns:List<? extends ExpressionTree>

the dimension expressions

getInitializersback to summary
public List<? extends ExpressionTree> getInitializers()

Returns the initializer expressions.

Returns:List<? extends ExpressionTree>

the initializer expressions

getTypeback to summary
public Tree getType()

Returns the base type of the expression. May be null for an array initializer expression.

Returns:Tree

the base type