parse a java id

@return
334836
private String parseJavaId() {
		StringBuilder sb = new StringBuilder();
		int ch;
		while (true) {
			ch = characterBuffer.peekChar();
			if (ch == CharacterBuffer.EOS || !isJavaIdentifierPart(ch)) {
				if (sb.length() == 0) {
					return null;
				}
				return sb.toString();
			}
			sb.append((char) ch);
			characterBuffer.nextChar();
		}
	}
1082649
public Object parseObject() {
    Map map = new SimpleBindings();
    advance();
    if(T.getType() == TokenType.STRING) {
      parseMember(map);
      while(T.getType() == TokenType.COMMA) {
        advance();
        parseMember(map);
      }
    }
    checkAndSkip(TokenType.RCURLY, "}");
    return map;
  }
233521
public static String getShortID(String id) {
        String canonicalID = getCanonicalCLDRID(id);
        if (canonicalID == null) {
            return null;
        }
        return getShortIDFromCanonical(canonicalID);
    }
1104131
public String getFormatCode(long id)
    {
        if(numFmts == null)
            cacheFormatCodes();
        return (String)numFmts.get(new Long(id));
    }
1263022
public String getId() {
        Pattern replace = Pattern.compile("\\W+");
        return StringUtils.defaultIfEmpty(id, replace.matcher(getName()).replaceAll(""));
    }
1017695
private IdReader<ID> getIdReader()
  {
    if (_idReader != null)
      return _idReader;

    Class<?> idType = _entityInfo.id().getJavaType();

    if (isInteger(idType)) {
      _idReader = (IdReader<ID>) new IntIdReader();
    }
    else if (long.class == idType || Long.class == idType) {
      _idReader = (IdReader<ID>) new LongIdReader();
    }
    else if (IdAsset.class == idType) {
      _idReader = (IdReader<ID>) new IdAssetReader();
    }
    else if (String.class == idType) {
      _idReader = (IdReader<ID>) new StringIdReader();
    }
    else {
      throw new IllegalStateException(String.valueOf(idType));
    }

    return _idReader;
  }
1252218
private List<String> parseRows(JsonParser jp, List<String> result) throws IOException {
        while(jp.nextToken() == JsonToken.START_OBJECT) {
            while(jp.nextToken() == JsonToken.FIELD_NAME)
            {
                String fieldName = jp.getCurrentName();
                jp.nextToken();
                if ("id".equals(fieldName)) {
                    result.add(jp.getText());
                } else {
                    jp.skipChildren();
                }
            }
        }
        return result;
    }
706476
@SuppressWarnings({ "unchecked", "rawtypes" })
	public Serializable parseIdString(String id) {
		Class idType = getIdField().getType();
		return parser.parse(id, idType);
	}
110957
public function extractId() {
        $regex = '/[\'"]id[\'"] *: *([0-9]*)/';
        $rawData = $this->getRawPostData();
        if (preg_match($regex, $rawData, $m)) {
            return intval($m[1]);
        } else {
            return null;
        }
    }
1248975
public <P extends ParaObject> P read(String id) {
		if (StringUtils.isBlank(id)) {
			return null;
		}
		Map<String, Object> data = getEntity(invokeGet("_id/".concat(id), null), Map.class);
		return ParaObjectUtils.setAnnotatedFields(data);
	}
424536
private AstFunction parseFunctionDefinition() {
    eatChar('{');

    // Parse the list of ids
    ArrayList<String> ids = new ArrayList<>();
    ids.add("");  // 1-based ID list
    while (skipWS() != '.') {
      String id = token();
      if (!Character.isJavaIdentifierStart(id.charAt(0)))
        throw new IllegalASTException("variable must be a valid Java identifier: " + id);
      for (char c : id.toCharArray())
        if (!Character.isJavaIdentifierPart(c))
          throw new IllegalASTException("variable must be a valid Java identifier: " + id);
      ids.add(id);
    }

    // Single dot separates the list of ids from the body of the function
    eatChar('.');

    // Parse the body
    AstRoot body = parseNext();
    if (skipWS() != '}')
      throw new IllegalASTException("Expected the end of the function, but found '" + peek(0) + "'");
    eatChar('}');

    return new AstFunction(ids, body);
  }
459975
protected RelationKey parseRelationKey(String id) {

        Matcher matcher = RELATION_PATTERN.matcher(id);
        matcher.find();
        CmsUUID src = new CmsUUID(matcher.group(1));
        CmsUUID tgt = new CmsUUID(matcher.group(2));
        String tp = matcher.group(3);
        return new RelationKey(src, tgt, tp);
    }
677552
private final String getIdAndName() {
        StringBuilder sb = new StringBuilder().append(id);
        if (!" ".equals(name))
            sb.append(" (").append(name).append(')');
        return sb.toString();
    }
965944
@Override
    protected String consumeIdentifier( DdlTokenStream tokens ) throws ParsingException {
        Position startPosition = tokens.nextPosition();
        String id = super.consumeIdentifier(tokens);
        if (!tokens.hasNext()) return id;
        Position nextPosition = tokens.nextPosition();

        while (((nextPosition.getIndexInContent() - startPosition.getIndexInContent() - id.length()) == 0)) {
            // allowed symbols in an identifier: underscore, dollar sign, pound sign, at sign
            if (tokens.matches(DdlTokenizer.SYMBOL)) {
                if (tokens.matches('$') || tokens.matches('#') || tokens.matches('@')) {
                    id += tokens.consume(); // consume symbol
                } else {
                    break; // not a valid ID symbol
                }
            } else {
                id += tokens.consume(); // consume text
            }

            nextPosition = tokens.nextPosition();
        }

        return id;
    }
1247054
public String getID() {
        byte[] genBytes = new byte[_byteArraySize];
        synchronized (_random) {
            _random.nextBytes(genBytes);
        }
        String id = convertSessionIdBytesToSessionId(genBytes, _sessionIDLength);
        if (tc.isDebugEnabled()) {
            Tr.debug(tc, "sessionID=" + id);
        }
        return id;
    }
279849
public String makeJavaIdentifier(String id)
    {
        String jid = makeJavaId(id);
        String old = map.put(jid, id);
        if (old != null && !old.equals(id))
        {
            throw new IllegalArgumentException("both "+id+" and "+old+" makes the same java id "+jid);
        }
        return jid;
    }
473382
@Override
    public Object getIdentifierValue(Identifier id,
                                     boolean ignoreType)
                    throws BadMessageFormatMatchingException {
        return getIdentifierValue(id, ignoreType, null, false);
    }