/** * Creates a new token entry with the given informations. * @param image * @param tokenSrcID * @param beginLine the linenumber, 1-based. */ public TokenEntry(String image, String tokenSrcID, int beginLine) { setImage(image); this.tokenSrcID = tokenSrcID; this.beginLine = beginLine; this.index = TOKEN_COUNT.get().getAndIncrement(); }
public void restoreConstructorToken(Tokens tokenEntries, Token currentToken) { if (!ignoreIdentifiers) { return; } if (currentToken.kind == JavaParserConstants.LPAREN) { // was the previous token a constructor? If so, restore the // identifier if (!classMembersIndentations.isEmpty() && classMembersIndentations.peek().name.equals(prevIdentifier)) { int lastTokenIndex = tokenEntries.size() - 1; TokenEntry lastToken = tokenEntries.getTokens().get(lastTokenIndex); lastToken.setImage(prevIdentifier); } } } }
/** * Creates a new token entry with the given informations. * @param image * @param tokenSrcID * @param beginLine the linenumber, 1-based. */ public TokenEntry(String image, String tokenSrcID, int beginLine) { setImage(image); this.tokenSrcID = tokenSrcID; this.beginLine = beginLine; this.index = TOKEN_COUNT.get().getAndIncrement(); }
public void restoreConstructorToken(Tokens tokenEntries, Token currentToken) { if (!ignoreIdentifiers) { return; } if (currentToken.kind == JavaParserConstants.LPAREN) { // was the previous token a constructor? If so, restore the // identifier if (!classMembersIndentations.isEmpty() && classMembersIndentations.peek().name.equals(prevIdentifier)) { int lastTokenIndex = tokenEntries.size() - 1; TokenEntry lastToken = tokenEntries.getTokens().get(lastTokenIndex); lastToken.setImage(prevIdentifier); } } } }