diff -r f91144b7da75 -r af8417e590f4 src/share/classes/com/sun/tools/javac/code/Symbol.java --- a/src/share/classes/com/sun/tools/javac/code/Symbol.java Mon Feb 04 18:08:53 2013 -0500 +++ b/src/share/classes/com/sun/tools/javac/code/Symbol.java Sun Feb 17 16:44:55 2013 -0500 @@ -217,6 +217,14 @@ return (flags() & INTERFACE) != 0; } + public boolean isPrivate() { + return (flags_field & Flags.AccessFlags) == PRIVATE; + } + + public boolean isEnum() { + return (flags() & ENUM) != 0; + } + /** Is this symbol declared (directly or indirectly) local * to a method or variable initializer? * Also includes fields of inner classes which are in @@ -479,7 +487,7 @@ } // This method is part of the javax.lang.model API, do not use this in javac code. - public A[] getAnnotations(Class annoType) { + public A[] getAnnotationsByType(Class annoType) { return JavacElements.getAnnotations(this, annoType); } @@ -496,9 +504,9 @@ return l.toList(); } - public static class DelegatedSymbol extends Symbol { - protected Symbol other; - public DelegatedSymbol(Symbol other) { + public static class DelegatedSymbol 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 +540,10 @@ public R accept(Symbol.Visitor v, P p) { return v.visitSymbol(other, p); } + + public T getUnderlyingSymbol() { + return other; + } } /** A class for type symbols. Type variables are represented by instances @@ -1078,6 +1090,9 @@ /** The code of the method. */ public Code code = null; + /** The extra (synthetic/mandated) parameters of the method. */ + public List extraParams = List.nil(); + /** The parameters of the method. */ public List params = null;