langtools/src/share/classes/com/sun/source/tree/NewClassTree.java
changeset 25287 d2440361b323
parent 20612 4761f3ff7afb
equal deleted inserted replaced
25286:09b9113ad68a 25287:d2440361b323
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    48  * @author Jonathan Gibbons
    48  * @author Jonathan Gibbons
    49  * @since 1.6
    49  * @since 1.6
    50  */
    50  */
    51 @jdk.Exported
    51 @jdk.Exported
    52 public interface NewClassTree extends ExpressionTree {
    52 public interface NewClassTree extends ExpressionTree {
       
    53     /**
       
    54      * Returns the enclosing expression, or {@code null} if none.
       
    55      * @return the enclosing expression
       
    56      */
    53     ExpressionTree getEnclosingExpression();
    57     ExpressionTree getEnclosingExpression();
       
    58 
       
    59     /**
       
    60      * Returns the type arguments for the object being created.
       
    61      * @return the type arguments
       
    62      */
    54     List<? extends Tree> getTypeArguments();
    63     List<? extends Tree> getTypeArguments();
       
    64 
       
    65     /**
       
    66      * Returns the name of the class being instantiated.
       
    67      * @return the name
       
    68      */
    55     ExpressionTree getIdentifier();
    69     ExpressionTree getIdentifier();
       
    70 
       
    71     /**
       
    72      * Returns the arguments for the constructor to be invoked.
       
    73      * @return the arguments
       
    74      */
    56     List<? extends ExpressionTree> getArguments();
    75     List<? extends ExpressionTree> getArguments();
       
    76 
       
    77     /**
       
    78      * Returns the class body if an anonymous class is being
       
    79      * instantiated, and {@code null} otherwise.
       
    80      * @return the class body
       
    81      */
    57     ClassTree getClassBody();
    82     ClassTree getClassBody();
    58 }
    83 }