equal
deleted
inserted
replaced
33 import java.util.Set; |
33 import java.util.Set; |
34 |
34 |
35 import javax.lang.model.type.*; |
35 import javax.lang.model.type.*; |
36 |
36 |
37 import com.sun.tools.javac.code.Symbol.*; |
37 import com.sun.tools.javac.code.Symbol.*; |
38 import com.sun.tools.javac.model.JavacAnnoConstructs; |
|
39 import com.sun.tools.javac.util.*; |
38 import com.sun.tools.javac.util.*; |
40 import static com.sun.tools.javac.code.BoundKind.*; |
39 import static com.sun.tools.javac.code.BoundKind.*; |
41 import static com.sun.tools.javac.code.Flags.*; |
40 import static com.sun.tools.javac.code.Flags.*; |
42 import static com.sun.tools.javac.code.Kinds.*; |
41 import static com.sun.tools.javac.code.Kinds.*; |
43 import static com.sun.tools.javac.code.TypeTag.*; |
42 import static com.sun.tools.javac.code.TypeTag.*; |
68 * This code and its internal interfaces are subject to change or |
67 * This code and its internal interfaces are subject to change or |
69 * deletion without notice.</b> |
68 * deletion without notice.</b> |
70 * |
69 * |
71 * @see TypeTag |
70 * @see TypeTag |
72 */ |
71 */ |
73 public abstract class Type implements TypeMirror { |
72 public abstract class Type extends AnnoConstruct implements TypeMirror { |
74 |
73 |
75 /** Constant type: no type at all. */ |
74 /** Constant type: no type at all. */ |
76 public static final JCNoType noType = new JCNoType(); |
75 public static final JCNoType noType = new JCNoType(); |
77 |
76 |
78 /** Constant type: special type to be used during recovery of deferred expressions. */ |
77 /** Constant type: special type to be used during recovery of deferred expressions. */ |
231 public Type unannotatedType() { |
230 public Type unannotatedType() { |
232 return this; |
231 return this; |
233 } |
232 } |
234 |
233 |
235 @Override |
234 @Override |
236 public List<? extends Attribute.TypeCompound> getAnnotationMirrors() { |
235 public List<Attribute.TypeCompound> getAnnotationMirrors() { |
237 return List.nil(); |
236 return List.nil(); |
238 } |
237 } |
|
238 |
239 |
239 |
240 @Override |
240 @Override |
241 public <A extends Annotation> A getAnnotation(Class<A> annotationType) { |
241 public <A extends Annotation> A getAnnotation(Class<A> annotationType) { |
242 return null; |
242 return null; |
243 } |
243 } |
|
244 |
244 |
245 |
245 @Override |
246 @Override |
246 public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) { |
247 public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) { |
247 @SuppressWarnings("unchecked") |
248 @SuppressWarnings("unchecked") |
248 A[] tmp = (A[]) java.lang.reflect.Array.newInstance(annotationType, 0); |
249 A[] tmp = (A[]) java.lang.reflect.Array.newInstance(annotationType, 0); |
1844 public boolean isAnnotated() { |
1845 public boolean isAnnotated() { |
1845 return true; |
1846 return true; |
1846 } |
1847 } |
1847 |
1848 |
1848 @Override |
1849 @Override |
1849 public List<? extends Attribute.TypeCompound> getAnnotationMirrors() { |
1850 public List<Attribute.TypeCompound> getAnnotationMirrors() { |
1850 return typeAnnotations; |
1851 return typeAnnotations; |
1851 } |
1852 } |
1852 |
1853 |
1853 @Override |
|
1854 public <A extends Annotation> A getAnnotation(Class<A> annotationType) { |
|
1855 return JavacAnnoConstructs.getAnnotation(this, annotationType); |
|
1856 } |
|
1857 |
|
1858 @Override |
|
1859 public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) { |
|
1860 return JavacAnnoConstructs.getAnnotationsByType(this, annotationType); |
|
1861 } |
|
1862 |
1854 |
1863 @Override |
1855 @Override |
1864 public TypeKind getKind() { |
1856 public TypeKind getKind() { |
1865 return underlyingType.getKind(); |
1857 return underlyingType.getKind(); |
1866 } |
1858 } |