src/share/classes/com/sun/tools/javac/tree/Pretty.java

changeset 1143
ec59a2ce9114
parent 1142
c896d95e7469
child 1280
5c0b3faeb0b0
equal deleted inserted replaced
1142:c896d95e7469 1143:ec59a2ce9114
25 25
26 package com.sun.tools.javac.tree; 26 package com.sun.tools.javac.tree;
27 27
28 import java.io.*; 28 import java.io.*;
29 import java.util.*; 29 import java.util.*;
30
31 import com.sun.source.tree.MemberReferenceTree.ReferenceMode;
30 32
31 import com.sun.tools.javac.util.*; 33 import com.sun.tools.javac.util.*;
32 import com.sun.tools.javac.util.List; 34 import com.sun.tools.javac.util.List;
33 import com.sun.tools.javac.code.*; 35 import com.sun.tools.javac.code.*;
34 36
1061 } catch (IOException e) { 1063 } catch (IOException e) {
1062 throw new UncheckedIOException(e); 1064 throw new UncheckedIOException(e);
1063 } 1065 }
1064 } 1066 }
1065 1067
1068 public void visitReference(JCMemberReference tree) {
1069 try {
1070 printExpr(tree.expr);
1071 print("#");
1072 if (tree.typeargs != null) {
1073 print("<");
1074 printExprs(tree.typeargs);
1075 print(">");
1076 }
1077 print(tree.getMode() == ReferenceMode.INVOKE ? tree.name : "new");
1078 } catch (IOException e) {
1079 throw new UncheckedIOException(e);
1080 }
1081 }
1082
1066 public void visitIdent(JCIdent tree) { 1083 public void visitIdent(JCIdent tree) {
1067 try { 1084 try {
1068 print(tree.name); 1085 print(tree.name);
1069 } catch (IOException e) { 1086 } catch (IOException e) {
1070 throw new UncheckedIOException(e); 1087 throw new UncheckedIOException(e);

mercurial