langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java
changeset 16557 67a3ae363f03
parent 16333 a6e1ded87200
child 16967 79d444669f3f
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java	Mon Mar 18 14:40:32 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java	Mon Mar 18 18:33:13 2013 -0700
@@ -483,12 +483,12 @@
      */
     @Deprecated
     public <A extends java.lang.annotation.Annotation> A getAnnotation(Class<A> annoType) {
-        return JavacElements.getAnnotation(this, annoType);
+        return JavacAnnoConstructs.getAnnotation(this, annoType);
     }
 
     // This method is part of the javax.lang.model API, do not use this in javac code.
     public <A extends java.lang.annotation.Annotation> A[] getAnnotationsByType(Class<A> annoType) {
-        return JavacElements.getAnnotations(this, annoType);
+        return JavacAnnoConstructs.getAnnotations(this, annoType);
     }
 
     // TODO: getEnclosedElements should return a javac List, fix in FilteredMemberList
@@ -935,11 +935,12 @@
         }
 
         /**
-         * @deprecated this method should never be used by javac internally.
+         * Since this method works in terms of the runtime representation
+         * of annotations, it should never be used by javac internally.
          */
-        @Override @Deprecated
+        @Override
         public <A extends java.lang.annotation.Annotation> A getAnnotation(Class<A> annoType) {
-            return JavacElements.getAnnotation(this, annoType);
+            return JavacAnnoConstructs.getAnnotation(this, annoType);
         }
 
         public <R, P> R accept(ElementVisitor<R, P> v, P p) {
@@ -1444,6 +1445,10 @@
             return v.visitMethodSymbol(this, p);
         }
 
+        public Type getReceiverType() {
+            return asType().getReceiverType();
+        }
+
         public Type getReturnType() {
             return asType().getReturnType();
         }