Lines Matching refs:pos

1011         int pos = 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()) {
1021 + pos);
1035 int pos = 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') {
1045 ++pos;
1047 pos = checkTypeSignature(signature, pos);
1049 while (getChar(signature, pos) == '^') {
1050 ++pos;
1051 if (getChar(signature, pos) == 'L') {
1052 pos = checkClassTypeSignature(signature, pos);
1054 pos = checkTypeVariableSignature(signature, pos);
1057 if (pos != signature.length()) {
1059 + pos);
1069 int pos = checkFieldTypeSignature(signature, 0);
1070 if (pos != signature.length()) {
1072 + pos);
1080 * @param pos index of first character to 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);
1093 return pos + 1;
1100 * @param pos index of first character to 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);
1116 return pos;
1123 * @param pos index of first character to 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);
1148 * @param pos index of first character to 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);
1178 * @param pos index of first character to 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);
1190 return pos + 1;
1197 * @param pos index of first character to be checked.
1200 private static int checkTypeArgument(final String signature, int pos) {
1204 char c = getChar(signature, pos);
1206 return pos + 1;
1208 pos++;
1210 return checkFieldTypeSignature(signature, pos);
1217 * @param pos index of first character to be checked.
1222 int pos)
1227 pos = checkChar('T', signature, pos);
1228 pos = checkIdentifier(signature, pos);
1229 return checkChar(';', signature, pos);
1236 * @param pos index of first character to be checked.
1239 private static int checkTypeSignature(final String signature, int pos) {
1243 switch (getChar(signature, pos)) {
1252 return pos + 1;
1254 return checkFieldTypeSignature(signature, pos);
1262 * @param pos index of first character to be checked.
1265 private static int checkIdentifier(final String signature, int pos) {
1266 if (!Character.isJavaIdentifierStart(getChar(signature, pos))) {
1268 + ": identifier expected at index " + pos);
1270 ++pos;
1271 while (Character.isJavaIdentifierPart(getChar(signature, pos))) {
1272 ++pos;
1274 return pos;
1281 * @param pos index of first character to be checked.
1284 private static int checkChar(final char c, final String signature, int pos)
1286 if (getChar(signature, pos) == c) {
1287 return pos + 1;
1290 + "' expected at index " + pos);
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;