Source code: javax/ide/model/java/source/tree/NewClassExpressionT.java
1 /*
2 * @(#)NewClassExpressionT.java
3 */
4
5 package javax.ide.model.java.source.tree;
6
7 /**
8 * An expression creating a new instance of a class. Class creators come
9 * two flavors: normal and anonymous class. <p/>
10 *
11 * @author Andy Yu
12 * */
13 public interface NewClassExpressionT
14 extends InvokeExpressionT
15 {
16 // ----------------------------------------------------------------------
17
18 /**
19 * @return The special ClassT object representing the anonymous
20 * class body. Null if no class body was declared.
21 */
22 public ClassT getAnonymousClass();
23
24 /**
25 * Gets the type reference for this element.
26 *
27 * @return This element's type reference.
28 */
29 public TypeReferenceT getType();
30
31
32 /**
33 * Unlinks the current source type and links the input element.
34 *
35 * @param type The new type reference.
36 *
37 * @throws IllegalStateException if the input type is already linked.
38 */
39 public void setType( TypeReferenceT type );
40
41 }