Lines Matching refs:signature

49  * in a method whose signature is <tt>void m ()</tt>, the invalid instruction

607 final String signature,
624 mv.visitLocalVariable(name, desc, signature, start, end, index);
1003 * Checks a class signature.
1005 * @param signature a string containing the signature that must be checked.
1007 static void checkClassSignature(final String signature) {
1012 if (getChar(signature, 0) == '<') {
1013 pos = checkFormalTypeParameters(signature, pos);
1015 pos = checkClassTypeSignature(signature, pos);
1016 while (getChar(signature, pos) == 'L') {
1017 pos = checkClassTypeSignature(signature, pos);
1019 if (pos != signature.length()) {
1020 throw new IllegalArgumentException(signature + ": error at index "
1026 * Checks a method signature.
1028 * @param signature a string containing the signature that must be checked.
1030 static void checkMethodSignature(final String signature) {
1036 if (getChar(signature, 0) == '<') {
1037 pos = checkFormalTypeParameters(signature, pos);
1039 pos = checkChar('(', signature, pos);
1040 while ("ZCBSIFJDL[T".indexOf(getChar(signature, pos)) != -1) {
1041 pos = checkTypeSignature(signature, pos);
1043 pos = checkChar(')', signature, pos);
1044 if (getChar(signature, pos) == 'V') {
1047 pos = checkTypeSignature(signature, pos);
1049 while (getChar(signature, pos) == '^') {
1051 if (getChar(signature, pos) == 'L') {
1052 pos = checkClassTypeSignature(signature, pos);
1054 pos = checkTypeVariableSignature(signature, pos);
1057 if (pos != signature.length()) {
1058 throw new IllegalArgumentException(signature + ": error at index "
1064 * Checks a field signature.
1066 * @param signature a string containing the signature that must be checked.
1068 static void checkFieldSignature(final String signature) {
1069 int pos = checkFieldTypeSignature(signature, 0);
1070 if (pos != signature.length()) {
1071 throw new IllegalArgumentException(signature + ": error at index "
1077 * Checks the formal type parameters of a class or method signature.
1079 * @param signature a string containing the signature that must be checked.
1083 private static int checkFormalTypeParameters(final String signature, int pos)
1088 pos = checkChar('<', signature, pos);
1089 pos = checkFormalTypeParameter(signature, pos);
1090 while (getChar(signature, pos) != '>') {
1091 pos = checkFormalTypeParameter(signature, pos);
1097 * Checks a formal type parameter of a class or method signature.
1099 * @param signature a string containing the signature that must be checked.
1103 private static int checkFormalTypeParameter(final String signature, int pos)
1108 pos = checkIdentifier(signature, pos);
1109 pos = checkChar(':', signature, pos);
1110 if ("L[T".indexOf(getChar(signature, pos)) != -1) {
1111 pos = checkFieldTypeSignature(signature, pos);
1113 while (getChar(signature, pos) == ':') {
1114 pos = checkFieldTypeSignature(signature, pos + 1);
1120 * Checks a field type signature.
1122 * @param signature a string containing the signature that must be checked.
1126 private static int checkFieldTypeSignature(final String signature, int pos)
1134 switch (getChar(signature, pos)) {
1136 return checkClassTypeSignature(signature, pos);
1138 return checkTypeSignature(signature, pos + 1);
1140 return checkTypeVariableSignature(signature, pos);
1145 * Checks a class type signature.
1147 * @param signature a string containing the signature that must be checked.
1151 private static int checkClassTypeSignature(final String signature, int pos)
1157 pos = checkChar('L', signature, pos);
1158 pos = checkIdentifier(signature, pos);
1159 while (getChar(signature, pos) == '/') {
1160 pos = checkIdentifier(signature, pos + 1);
1162 if (getChar(signature, pos) == '<') {
1163 pos = checkTypeArguments(signature, pos);
1165 while (getChar(signature, pos) == '.') {
1166 pos = checkIdentifier(signature, pos + 1);
1167 if (getChar(signature, pos) == '<') {
1168 pos = checkTypeArguments(signature, pos);
1171 return checkChar(';', signature, pos);
1175 * Checks the type arguments in a class type signature.
1177 * @param signature a string containing the signature that must be checked.
1181 private static int checkTypeArguments(final String signature, int pos) {
1185 pos = checkChar('<', signature, pos);
1186 pos = checkTypeArgument(signature, pos);
1187 while (getChar(signature, pos) != '>') {
1188 pos = checkTypeArgument(signature, pos);
1194 * Checks a type argument in a class type signature.
1196 * @param signature a string containing the signature that must be checked.
1200 private static int checkTypeArgument(final String signature, int pos) {
1204 char c = getChar(signature, pos);
1210 return checkFieldTypeSignature(signature, pos);
1214 * Checks a type variable signature.
1216 * @param signature a string containing the signature that must be checked.
1221 final String signature,
1227 pos = checkChar('T', signature, pos);
1228 pos = checkIdentifier(signature, pos);
1229 return checkChar(';', signature, pos);
1233 * Checks a type signature.
1235 * @param signature a string containing the signature that must be checked.
1239 private static int checkTypeSignature(final String signature, int pos) {
1243 switch (getChar(signature, pos)) {
1254 return checkFieldTypeSignature(signature, pos);
1261 * @param signature a string containing the signature that must be checked.
1265 private static int checkIdentifier(final String signature, int pos) {
1266 if (!Character.isJavaIdentifierStart(getChar(signature, pos))) {
1267 throw new IllegalArgumentException(signature
1271 while (Character.isJavaIdentifierPart(getChar(signature, pos))) {
1280 * @param signature a string containing the signature that must be checked.
1284 private static int checkChar(final char c, final String signature, int pos)
1286 if (getChar(signature, pos) == c) {
1289 throw new IllegalArgumentException(signature + ": '" + c
1294 * Returns the signature car at the given index.
1296 * @param signature a signature.
1297 * @param pos an index in signature.
1301 private static char getChar(final String signature, int pos) {
1302 return pos < signature.length() ? signature.charAt(pos) : (char) 0;