1.1 --- a/src/share/classes/com/sun/tools/javac/tree/Pretty.java Thu Nov 24 13:36:20 2011 +0000 1.2 +++ b/src/share/classes/com/sun/tools/javac/tree/Pretty.java Thu Nov 24 13:38:40 2011 +0000 1.3 @@ -28,6 +28,8 @@ 1.4 import java.io.*; 1.5 import java.util.*; 1.6 1.7 +import com.sun.source.tree.MemberReferenceTree.ReferenceMode; 1.8 + 1.9 import com.sun.tools.javac.util.*; 1.10 import com.sun.tools.javac.util.List; 1.11 import com.sun.tools.javac.code.*; 1.12 @@ -1063,6 +1065,21 @@ 1.13 } 1.14 } 1.15 1.16 + public void visitReference(JCMemberReference tree) { 1.17 + try { 1.18 + printExpr(tree.expr); 1.19 + print("#"); 1.20 + if (tree.typeargs != null) { 1.21 + print("<"); 1.22 + printExprs(tree.typeargs); 1.23 + print(">"); 1.24 + } 1.25 + print(tree.getMode() == ReferenceMode.INVOKE ? tree.name : "new"); 1.26 + } catch (IOException e) { 1.27 + throw new UncheckedIOException(e); 1.28 + } 1.29 + } 1.30 + 1.31 public void visitIdent(JCIdent tree) { 1.32 try { 1.33 print(tree.name);