src/share/classes/com/sun/tools/javac/code/Printer.java

changeset 2134
b0c086cd4520
parent 2047
5f915a0c9615
child 2525
2eb010b6cb22
     1.1 --- a/src/share/classes/com/sun/tools/javac/code/Printer.java	Tue Oct 15 22:15:35 2013 +0200
     1.2 +++ b/src/share/classes/com/sun/tools/javac/code/Printer.java	Tue Oct 15 15:57:13 2013 -0700
     1.3 @@ -260,24 +260,23 @@
     1.4  
     1.5      @Override
     1.6      public String visitAnnotatedType(AnnotatedType t, Locale locale) {
     1.7 -        if (t.typeAnnotations != null &&
     1.8 -                t.typeAnnotations.nonEmpty()) {
     1.9 -            if (t.underlyingType.hasTag(TypeTag.ARRAY)) {
    1.10 +        if (t.getAnnotationMirrors().nonEmpty()) {
    1.11 +            if (t.unannotatedType().hasTag(TypeTag.ARRAY)) {
    1.12                  StringBuilder res = new StringBuilder();
    1.13                  printBaseElementType(t, res, locale);
    1.14                  printBrackets(t, res, locale);
    1.15                  return res.toString();
    1.16 -            } else if (t.underlyingType.hasTag(TypeTag.CLASS) &&
    1.17 -                    t.underlyingType.getEnclosingType() != Type.noType) {
    1.18 -                return visit(t.underlyingType.getEnclosingType(), locale) +
    1.19 +            } else if (t.unannotatedType().hasTag(TypeTag.CLASS) &&
    1.20 +                    t.unannotatedType().getEnclosingType() != Type.noType) {
    1.21 +                return visit(t.unannotatedType().getEnclosingType(), locale) +
    1.22                          ". " +
    1.23 -                        t.typeAnnotations +
    1.24 -                        " " + className((ClassType)t.underlyingType, false, locale);
    1.25 +                        t.getAnnotationMirrors() +
    1.26 +                        " " + className((ClassType)t.unannotatedType(), false, locale);
    1.27              } else {
    1.28 -                return t.typeAnnotations + " " + visit(t.underlyingType, locale);
    1.29 +                return t.getAnnotationMirrors() + " " + visit(t.unannotatedType(), locale);
    1.30              }
    1.31          } else {
    1.32 -            return visit(t.underlyingType, locale);
    1.33 +            return visit(t.unannotatedType(), locale);
    1.34          }
    1.35      }
    1.36  

mercurial