95 * {@link jdk.internal.org.objectweb.asm.ClassVisitor#visitMethod
96 * ClassVisitor.visitMethod} method).
97 *
98 * @param v
99 * the visitor that must visit this signature.
100 */
101 public void accept(final SignatureVisitor v) {
102 String signature = this.signature;
103 int len = signature.length();
104 int pos;
105 char c;
106
107 if (signature.charAt(0) == '<') {
108 pos = 2;
109 do {
110 int end = signature.indexOf(':', pos);
111 v.visitFormalTypeParameter(signature.substring(pos - 1, end));
112 pos = end + 1;
113
114 c = signature.charAt(pos);
115 if (c == 'L' || c == '[' || c == 'T') {
116 pos = parseType(signature, pos, v.visitClassBound());
117 }
118
119 while ((c = signature.charAt(pos++)) == ':') {
120 pos = parseType(signature, pos, v.visitInterfaceBound());
121 }
122 } while (c != '>');
123 } else {
124 pos = 0;
125 }
126
127 if (signature.charAt(pos) == '(') {
128 pos++;
129 while (signature.charAt(pos) != ')') {
130 pos = parseType(signature, pos, v.visitParameterType());
131 }
132 pos = parseType(signature, pos + 1, v.visitReturnType());
133 while (pos < len) {
134 pos = parseType(signature, pos + 1, v.visitExceptionType());
135 }
|
95 * {@link jdk.internal.org.objectweb.asm.ClassVisitor#visitMethod
96 * ClassVisitor.visitMethod} method).
97 *
98 * @param v
99 * the visitor that must visit this signature.
100 */
101 public void accept(final SignatureVisitor v) {
102 String signature = this.signature;
103 int len = signature.length();
104 int pos;
105 char c;
106
107 if (signature.charAt(0) == '<') {
108 pos = 2;
109 do {
110 int end = signature.indexOf(':', pos);
111 v.visitFormalTypeParameter(signature.substring(pos - 1, end));
112 pos = end + 1;
113
114 c = signature.charAt(pos);
115 if (c == 'L' || c == 'Q' || c == '[' || c == 'T') {
116 pos = parseType(signature, pos, v.visitClassBound());
117 }
118
119 while ((c = signature.charAt(pos++)) == ':') {
120 pos = parseType(signature, pos, v.visitInterfaceBound());
121 }
122 } while (c != '>');
123 } else {
124 pos = 0;
125 }
126
127 if (signature.charAt(pos) == '(') {
128 pos++;
129 while (signature.charAt(pos) != ')') {
130 pos = parseType(signature, pos, v.visitParameterType());
131 }
132 pos = parseType(signature, pos + 1, v.visitReturnType());
133 while (pos < len) {
134 pos = parseType(signature, pos + 1, v.visitExceptionType());
135 }
|