--- 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