Lines Matching refs:signature

30 package org.mockito.asm.signature;

33 * A type signature parser to make a signature visitor visit an existing
34 * signature.
42 * The signature to be read.
44 private final String signature;
47 * Constructs a {@link SignatureReader} for the given signature.
49 * @param signature A <i>ClassSignature</i>, <i>MethodTypeSignature</i>,
52 public SignatureReader(final String signature) {
53 this.signature = signature;
57 * Makes the given visitor visit the signature of this
58 * {@link SignatureReader}. This signature is the one specified in the
62 * <code>signature</code> parameter of the
64 * or a <i>MethodTypeSignature</i> (such as the <code>signature</code>
69 * @param v the visitor that must visit this signature.
72 String signature = this.signature;
73 int len = signature.length();
77 if (signature.charAt(0) == '<') {
80 int end = signature.indexOf(':', pos);
81 v.visitFormalTypeParameter(signature.substring(pos - 1, end));
84 c = signature.charAt(pos);
86 pos = parseType(signature, pos, v.visitClassBound());
89 while ((c = signature.charAt(pos++)) == ':') {
90 pos = parseType(signature, pos, v.visitInterfaceBound());
97 if (signature.charAt(pos) == '(') {
99 while (signature.charAt(pos) != ')') {
100 pos = parseType(signature, pos, v.visitParameterType());
102 pos = parseType(signature, pos + 1, v.visitReturnType());
104 pos = parseType(signature, pos + 1, v.visitExceptionType());
107 pos = parseType(signature, pos, v.visitSuperclass());
109 pos = parseType(signature, pos, v.visitInterface());
115 * Makes the given visitor visit the signature of this
116 * {@link SignatureReader}. This signature is the one specified in the
120 * <code>signature</code> parameter of the
126 * @param v the visitor that must visit this signature.
129 parseType(this.signature, 0, v);
133 * Parses a field type signature and makes the given visitor visit it.
135 * @param signature a string containing the signature that must be parsed.
136 * @param pos index of the first character of the signature to parsed.
137 * @param v the visitor that must visit this signature.
138 * @return the index of the first character after the parsed signature.
141 final String signature,
150 switch (c = signature.charAt(pos++)) {
164 return parseType(signature, pos, v.visitArrayType());
167 end = signature.indexOf(';', pos);
168 v.visitTypeVariable(signature.substring(pos, end));
176 switch (c = signature.charAt(pos++)) {
180 name = signature.substring(start, pos - 1);
197 name = signature.substring(start, pos - 1);
205 switch (c = signature.charAt(pos)) {
214 pos = parseType(signature,
219 pos = parseType(signature,