Lines 138-143
Link Here
|
138 |
* <p> |
138 |
* <p> |
139 |
* This class provides static methods and constants only. |
139 |
* This class provides static methods and constants only. |
140 |
* </p> |
140 |
* </p> |
|
|
141 |
* <p>Note: An empty signature is considered to be syntactically incorrect. So most methods will throw |
142 |
* an IllegalArgumentException if an empty signature is provided.</p> |
143 |
* |
141 |
* @noinstantiate This class is not intended to be instantiated by clients. |
144 |
* @noinstantiate This class is not intended to be instantiated by clients. |
142 |
*/ |
145 |
*/ |
143 |
public final class Signature { |
146 |
public final class Signature { |
Lines 2141-2147
Link Here
|
2141 |
* @param includeReturnType <code>true</code> if the return type is to be |
2144 |
* @param includeReturnType <code>true</code> if the return type is to be |
2142 |
* included |
2145 |
* included |
2143 |
* @return the char array representation of the method signature |
2146 |
* @return the char array representation of the method signature |
2144 |
* |
2147 |
* @throws IllegalArgumentException if the method signature is syntactically incorrect |
2145 |
* @since 2.0 |
2148 |
* @since 2.0 |
2146 |
*/ |
2149 |
*/ |
2147 |
public static char[] toCharArray(char[] methodSignature, char[] methodName, char[][] parameterNames, boolean fullyQualifyTypeNames, boolean includeReturnType) { |
2150 |
public static char[] toCharArray(char[] methodSignature, char[] methodName, char[][] parameterNames, boolean fullyQualifyTypeNames, boolean includeReturnType) { |
Lines 2172-2177
Link Here
|
2172 |
* @param isVargArgs <code>true</code> if the last argument should be displayed as a |
2175 |
* @param isVargArgs <code>true</code> if the last argument should be displayed as a |
2173 |
* variable argument, <code>false</code> otherwise. |
2176 |
* variable argument, <code>false</code> otherwise. |
2174 |
* @return the char array representation of the method signature |
2177 |
* @return the char array representation of the method signature |
|
|
2178 |
* @throws IllegalArgumentException if the method signature is syntactically incorrect |
2175 |
* |
2179 |
* |
2176 |
* @since 3.1 |
2180 |
* @since 3.1 |
2177 |
*/ |
2181 |
*/ |
Lines 2242-2255
Link Here
|
2242 |
* |
2246 |
* |
2243 |
* @param signature the type signature |
2247 |
* @param signature the type signature |
2244 |
* @return the string representation of the type |
2248 |
* @return the string representation of the type |
2245 |
* @exception IllegalArgumentException if the signature is not syntactically |
2249 |
* @exception IllegalArgumentException if the signature is syntactically incorrect |
2246 |
* correct |
|
|
2247 |
* |
2250 |
* |
2248 |
* @since 2.0 |
2251 |
* @since 2.0 |
2249 |
*/ |
2252 |
*/ |
2250 |
public static char[] toCharArray(char[] signature) throws IllegalArgumentException { |
2253 |
public static char[] toCharArray(char[] signature) throws IllegalArgumentException { |
2251 |
int sigLength = signature.length; |
2254 |
int sigLength = signature.length; |
2252 |
if (sigLength == 0 || signature[0] == C_PARAM_START || signature[0] == C_GENERIC_START) { |
2255 |
if (sigLength == 0) { |
|
|
2256 |
throw new IllegalArgumentException(); |
2257 |
} |
2258 |
if (signature[0] == C_PARAM_START || signature[0] == C_GENERIC_START) { |
2253 |
return toCharArray(signature, CharOperation.NO_CHAR, null, true, true); |
2259 |
return toCharArray(signature, CharOperation.NO_CHAR, null, true, true); |
2254 |
} |
2260 |
} |
2255 |
|
2261 |
|