1 /* |
1 /* |
2 * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2013, 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 |
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package com.sun.tools.javac.model; |
26 package com.sun.tools.javac.model; |
27 |
27 |
|
28 import java.lang.annotation.Annotation; |
28 import java.util.Collections; |
29 import java.util.Collections; |
29 import java.util.EnumSet; |
30 import java.util.EnumSet; |
30 import java.util.HashSet; |
|
31 import java.util.LinkedHashSet; |
31 import java.util.LinkedHashSet; |
32 import java.util.List; |
32 import java.util.List; |
33 import java.util.Set; |
33 import java.util.Set; |
34 |
34 |
35 import javax.lang.model.element.*; |
35 import javax.lang.model.element.*; |
331 } |
331 } |
332 } |
332 } |
333 |
333 |
334 return results; |
334 return results; |
335 } |
335 } |
|
336 |
|
337 public List<? extends AnnotationMirror> typeAnnotationsOf(TypeMirror type) { |
|
338 // TODO: these methods can be removed. |
|
339 return null; // ((Type)type).typeAnnotations; |
|
340 } |
|
341 |
|
342 public <A extends Annotation> A typeAnnotationOf(TypeMirror type, |
|
343 Class<A> annotationType) { |
|
344 // TODO: these methods can be removed. |
|
345 return null; // JavacElements.getAnnotation(((Type)type).typeAnnotations, annotationType); |
|
346 } |
|
347 |
|
348 public TypeMirror receiverTypeOf(ExecutableType type) { |
|
349 return ((Type)type).asMethodType().recvtype; |
|
350 } |
|
351 |
|
352 /* |
|
353 public <A extends Annotation> A receiverTypeAnnotationOf( |
|
354 ExecutableType type, Class<A> annotationType) { |
|
355 return JavacElements.getAnnotation( |
|
356 ((Type)type).asMethodType().receiverTypeAnnotations, |
|
357 annotationType); |
|
358 }*/ |
|
359 |
336 } |
360 } |