Source code: javax/ide/model/java/source/tree/TypeReferenceT.java
1 /*
2 * @(#)TypeReferenceT.java
3 */
4
5 package javax.ide.model.java.source.tree;
6
7 import java.util.List;
8
9 /**
10 * A type reference.
11 *
12 * @author Andy Yu
13 */
14 public interface TypeReferenceT
15 extends Tree, HasNameT
16 {
17 // ----------------------------------------------------------------------
18
19 static final TypeReferenceT[] EMPTY_ARRAY = new TypeReferenceT[ 0 ];
20
21
22 // ----------------------------------------------------------------------
23
24 /**
25 * True if this is a primitive type (including "void"). Array types
26 * of primitives return false.
27 */
28 public boolean isPrimitive();
29
30
31 // ----------------------------------------------------------------------
32
33 /**
34 * Gets the list of type arguments.
35 *
36 * @return The array of type arguments. <p/>
37 *
38 * List of TypeArgumentTs.
39 */
40 public List getTypeArguments();
41
42
43 // ----------------------------------------------------------------------
44
45 /**
46 * True if this is an array type reference.
47 *
48 * @return True if getArrayDimension() > 0.
49 */
50 public boolean isArray();
51
52 /**
53 * Gets the array dimension. Implicitly includes an array dimension
54 * increment of 1 IF this is the type of a variable-length argument.
55 *
56 * @return 0 means not an array.
57 */
58 public int getArrayDimension();
59
60
61 // ----------------------------------------------------------------------
62
63 }
64