equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
54 import com.sun.tools.classfile.ModuleResolution_attribute; |
54 import com.sun.tools.classfile.ModuleResolution_attribute; |
55 import com.sun.tools.classfile.ModuleTarget_attribute; |
55 import com.sun.tools.classfile.ModuleTarget_attribute; |
56 import com.sun.tools.classfile.RuntimeInvisibleAnnotations_attribute; |
56 import com.sun.tools.classfile.RuntimeInvisibleAnnotations_attribute; |
57 import com.sun.tools.classfile.RuntimeInvisibleParameterAnnotations_attribute; |
57 import com.sun.tools.classfile.RuntimeInvisibleParameterAnnotations_attribute; |
58 import com.sun.tools.classfile.RuntimeInvisibleTypeAnnotations_attribute; |
58 import com.sun.tools.classfile.RuntimeInvisibleTypeAnnotations_attribute; |
|
59 import com.sun.tools.classfile.RuntimeParameterAnnotations_attribute; |
59 import com.sun.tools.classfile.RuntimeVisibleAnnotations_attribute; |
60 import com.sun.tools.classfile.RuntimeVisibleAnnotations_attribute; |
60 import com.sun.tools.classfile.RuntimeVisibleParameterAnnotations_attribute; |
61 import com.sun.tools.classfile.RuntimeVisibleParameterAnnotations_attribute; |
61 import com.sun.tools.classfile.RuntimeVisibleTypeAnnotations_attribute; |
62 import com.sun.tools.classfile.RuntimeVisibleTypeAnnotations_attribute; |
62 import com.sun.tools.classfile.Signature_attribute; |
63 import com.sun.tools.classfile.Signature_attribute; |
63 import com.sun.tools.classfile.SourceDebugExtension_attribute; |
64 import com.sun.tools.classfile.SourceDebugExtension_attribute; |
762 } |
763 } |
763 indent(-1); |
764 indent(-1); |
764 return null; |
765 return null; |
765 } |
766 } |
766 |
767 |
767 @Override |
768 private void visitParameterAnnotations(String message, RuntimeParameterAnnotations_attribute attr) { |
768 public Void visitRuntimeVisibleParameterAnnotations(RuntimeVisibleParameterAnnotations_attribute attr, Void ignore) { |
769 println(message); |
769 println("RuntimeVisibleParameterAnnotations:"); |
|
770 indent(+1); |
770 indent(+1); |
771 for (int param = 0; param < attr.parameter_annotations.length; param++) { |
771 for (int param = 0; param < attr.parameter_annotations.length; param++) { |
772 println("parameter " + param + ": "); |
772 println("parameter " + param + ": "); |
773 indent(+1); |
773 indent(+1); |
774 for (int i = 0; i < attr.parameter_annotations[param].length; i++) { |
774 for (int i = 0; i < attr.parameter_annotations[param].length; i++) { |
777 println(); |
777 println(); |
778 } |
778 } |
779 indent(-1); |
779 indent(-1); |
780 } |
780 } |
781 indent(-1); |
781 indent(-1); |
|
782 } |
|
783 |
|
784 @Override |
|
785 public Void visitRuntimeVisibleParameterAnnotations(RuntimeVisibleParameterAnnotations_attribute attr, Void ignore) { |
|
786 visitParameterAnnotations("RuntimeVisibleParameterAnnotations:", (RuntimeParameterAnnotations_attribute) attr); |
782 return null; |
787 return null; |
783 } |
788 } |
784 |
789 |
785 @Override |
790 @Override |
786 public Void visitRuntimeInvisibleParameterAnnotations(RuntimeInvisibleParameterAnnotations_attribute attr, Void ignore) { |
791 public Void visitRuntimeInvisibleParameterAnnotations(RuntimeInvisibleParameterAnnotations_attribute attr, Void ignore) { |
787 println("RuntimeInvisibleParameterAnnotations:"); |
792 visitParameterAnnotations("RuntimeInvisibleParameterAnnotations:", (RuntimeParameterAnnotations_attribute) attr); |
788 indent(+1); |
|
789 for (int param = 0; param < attr.parameter_annotations.length; param++) { |
|
790 println(param + ": "); |
|
791 indent(+1); |
|
792 for (int i = 0; i < attr.parameter_annotations[param].length; i++) { |
|
793 print(i + ": "); |
|
794 annotationWriter.write(attr.parameter_annotations[param][i]); |
|
795 println(); |
|
796 } |
|
797 indent(-1); |
|
798 } |
|
799 indent(-1); |
|
800 return null; |
793 return null; |
801 } |
794 } |
802 |
795 |
803 @Override |
796 @Override |
804 public Void visitSignature(Signature_attribute attr, Void ignore) { |
797 public Void visitSignature(Signature_attribute attr, Void ignore) { |