src/share/classes/jdk/internal/org/objectweb/asm/signature/SignatureReader.java

Print this page

        

*** 73,84 **** private final String signature; /** * Constructs a {@link SignatureReader} for the given signature. * ! * @param signature A <i>ClassSignature</i>, <i>MethodTypeSignature</i>, ! * or <i>FieldTypeSignature</i>. */ public SignatureReader(final String signature) { this.signature = signature; } --- 73,85 ---- private final String signature; /** * Constructs a {@link SignatureReader} for the given signature. * ! * @param signature ! * A <i>ClassSignature</i>, <i>MethodTypeSignature</i>, or ! * <i>FieldTypeSignature</i>. */ public SignatureReader(final String signature) { this.signature = signature; }
*** 85,103 **** /** * Makes the given visitor visit the signature of this * {@link SignatureReader}. This signature is the one specified in the * constructor (see {@link #SignatureReader(String) SignatureReader}). This * method is intended to be called on a {@link SignatureReader} that was ! * created using a <i>ClassSignature</i> (such as the * <code>signature</code> parameter of the ! * {@link jdk.internal.org.objectweb.asm.ClassVisitor#visit ClassVisitor.visit} method) ! * or a <i>MethodTypeSignature</i> (such as the <code>signature</code> ! * parameter of the ! * {@link jdk.internal.org.objectweb.asm.ClassVisitor#visitMethod ClassVisitor.visitMethod} ! * method). * ! * @param v the visitor that must visit this signature. */ public void accept(final SignatureVisitor v) { String signature = this.signature; int len = signature.length(); int pos; --- 86,104 ---- /** * Makes the given visitor visit the signature of this * {@link SignatureReader}. This signature is the one specified in the * constructor (see {@link #SignatureReader(String) SignatureReader}). This * method is intended to be called on a {@link SignatureReader} that was ! * created using a <i>ClassSignature</i> (such as the <code>signature</code> ! * parameter of the {@link jdk.internal.org.objectweb.asm.ClassVisitor#visit ! * ClassVisitor.visit} method) or a <i>MethodTypeSignature</i> (such as the * <code>signature</code> parameter of the ! * {@link jdk.internal.org.objectweb.asm.ClassVisitor#visitMethod ! * ClassVisitor.visitMethod} method). * ! * @param v ! * the visitor that must visit this signature. */ public void accept(final SignatureVisitor v) { String signature = this.signature; int len = signature.length(); int pos;
*** 145,178 **** * {@link SignatureReader}. This signature is the one specified in the * constructor (see {@link #SignatureReader(String) SignatureReader}). This * method is intended to be called on a {@link SignatureReader} that was * created using a <i>FieldTypeSignature</i>, such as the * <code>signature</code> parameter of the ! * {@link jdk.internal.org.objectweb.asm.ClassVisitor#visitField ! * ClassVisitor.visitField} or {@link ! * jdk.internal.org.objectweb.asm.MethodVisitor#visitLocalVariable * MethodVisitor.visitLocalVariable} methods. * ! * @param v the visitor that must visit this signature. */ public void acceptType(final SignatureVisitor v) { parseType(this.signature, 0, v); } /** * Parses a field type signature and makes the given visitor visit it. * ! * @param signature a string containing the signature that must be parsed. ! * @param pos index of the first character of the signature to parsed. ! * @param v the visitor that must visit this signature. * @return the index of the first character after the parsed signature. */ ! private static int parseType( ! final String signature, ! int pos, ! final SignatureVisitor v) ! { char c; int start, end; boolean visited, inner; String name; --- 146,179 ---- * {@link SignatureReader}. This signature is the one specified in the * constructor (see {@link #SignatureReader(String) SignatureReader}). This * method is intended to be called on a {@link SignatureReader} that was * created using a <i>FieldTypeSignature</i>, such as the * <code>signature</code> parameter of the ! * {@link jdk.internal.org.objectweb.asm.ClassVisitor#visitField ClassVisitor.visitField} ! * or {@link jdk.internal.org.objectweb.asm.MethodVisitor#visitLocalVariable * MethodVisitor.visitLocalVariable} methods. * ! * @param v ! * the visitor that must visit this signature. */ public void acceptType(final SignatureVisitor v) { parseType(this.signature, 0, v); } /** * Parses a field type signature and makes the given visitor visit it. * ! * @param signature ! * a string containing the signature that must be parsed. ! * @param pos ! * index of the first character of the signature to parsed. ! * @param v ! * the visitor that must visit this signature. * @return the index of the first character after the parsed signature. */ ! private static int parseType(final String signature, int pos, ! final SignatureVisitor v) { char c; int start, end; boolean visited, inner; String name;
*** 238,254 **** ++pos; v.visitTypeArgument(); break; case '+': case '-': ! pos = parseType(signature, ! pos + 1, v.visitTypeArgument(c)); break; default: ! pos = parseType(signature, ! pos, v.visitTypeArgument('=')); break; } } } --- 239,253 ---- ++pos; v.visitTypeArgument(); break; case '+': case '-': ! pos = parseType(signature, pos + 1, v.visitTypeArgument(c)); break; default: ! pos = parseType(signature, pos, v.visitTypeArgument('=')); break; } } }