List of usage examples for org.eclipse.jdt.core.dom NumberLiteral getStartPosition
public final int getStartPosition()
From source file:nl.han.ica.core.ast.visitors.NumberLiteralVisitor.java
/** * Get the number literal that violated the rules * * @param beginLine beginline of the ruleviolation * @param beginColumn begincolumn of the ruleviolation * @return numberliteral that starts on same beginline and begincolumn *///from ww w . j a v a2 s. co m public NumberLiteral getLiteralViolation(int beginLine, int beginColumn) { NumberLiteral literalViolation = null; for (NumberLiteral numberLiteral : numberLiterals) { if (compilationUnit.getColumnNumber(numberLiteral.getStartPosition()) == beginColumn - 1 && compilationUnit.getLineNumber(numberLiteral.getStartPosition()) == beginLine) { literalViolation = numberLiteral; } } return literalViolation; }