< prev index next >

src/jdk.compiler/share/classes/com/sun/source/tree/NewClassTree.java

Print this page




  32  *
  33  * For example:
  34  * <pre>
  35  *   new <em>identifier</em> ( )
  36  *
  37  *   new <em>identifier</em> ( <em>arguments</em> )
  38  *
  39  *   new <em>typeArguments</em> <em>identifier</em> ( <em>arguments</em> )
  40  *       <em>classBody</em>
  41  *
  42  *   <em>enclosingExpression</em>.new <em>identifier</em> ( <em>arguments</em> )
  43  * </pre>
  44  *
  45  * @jls 15.9 Class Instance Creation Expressions
  46  *
  47  * @author Peter von der Ah&eacute;
  48  * @author Jonathan Gibbons
  49  * @since 1.6
  50  */
  51 public interface NewClassTree extends ExpressionTree {

  52     /**
  53      * Returns the enclosing expression, or {@code null} if none.
  54      * @return the enclosing expression
  55      */
  56     ExpressionTree getEnclosingExpression();
  57 
  58     /**
  59      * Returns the type arguments for the object being created.
  60      * @return the type arguments
  61      */
  62     List<? extends Tree> getTypeArguments();
  63 
  64     /**
  65      * Returns the name of the class being instantiated.
  66      * @return the name
  67      */
  68     ExpressionTree getIdentifier();
  69 
  70     /**
  71      * Returns the arguments for the constructor to be invoked.


  32  *
  33  * For example:
  34  * <pre>
  35  *   new <em>identifier</em> ( )
  36  *
  37  *   new <em>identifier</em> ( <em>arguments</em> )
  38  *
  39  *   new <em>typeArguments</em> <em>identifier</em> ( <em>arguments</em> )
  40  *       <em>classBody</em>
  41  *
  42  *   <em>enclosingExpression</em>.new <em>identifier</em> ( <em>arguments</em> )
  43  * </pre>
  44  *
  45  * @jls 15.9 Class Instance Creation Expressions
  46  *
  47  * @author Peter von der Ah&eacute;
  48  * @author Jonathan Gibbons
  49  * @since 1.6
  50  */
  51 public interface NewClassTree extends ExpressionTree {
  52 
  53     /**
  54      * Returns the enclosing expression, or {@code null} if none.
  55      * @return the enclosing expression
  56      */
  57     ExpressionTree getEnclosingExpression();
  58 
  59     /**
  60      * Returns the type arguments for the object being created.
  61      * @return the type arguments
  62      */
  63     List<? extends Tree> getTypeArguments();
  64 
  65     /**
  66      * Returns the name of the class being instantiated.
  67      * @return the name
  68      */
  69     ExpressionTree getIdentifier();
  70 
  71     /**
  72      * Returns the arguments for the constructor to be invoked.
< prev index next >