langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java
changeset 15564 6d8db91563a7
parent 15385 ee1eebe7e210
child 15719 6b64cf96346b
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java	Fri Feb 01 13:01:26 2013 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java	Sat Feb 02 21:04:56 2013 +0000
@@ -496,9 +496,9 @@
         return l.toList();
     }
 
-    public static class DelegatedSymbol extends Symbol {
-        protected Symbol other;
-        public DelegatedSymbol(Symbol other) {
+    public static class DelegatedSymbol<T extends Symbol> extends Symbol {
+        protected T other;
+        public DelegatedSymbol(T other) {
             super(other.kind, other.flags_field, other.name, other.type, other.owner);
             this.other = other;
         }
@@ -532,6 +532,10 @@
         public <R, P> R accept(Symbol.Visitor<R, P> v, P p) {
             return v.visitSymbol(other, p);
         }
+
+        public T getUnderlyingSymbol() {
+            return other;
+        }
     }
 
     /** A class for type symbols. Type variables are represented by instances