List of usage examples for org.eclipse.jdt.core.dom EnumConstantDeclaration getLength
public final int getLength()
From source file:br.uff.ic.gems.resources.ast.Visitor.java
@Override public boolean visit(EnumConstantDeclaration node) { int beginLine = beginLine(node); int endLine = cu.getLineNumber(node.getStartPosition() + node.getLength()); int beginColumn = beginColunm(node); int endColumn = cu.getColumnNumber(node.getStartPosition() + node.getLength()); languageConstructs.add(/*from w w w . j ava 2 s . c o m*/ new LanguageConstruct(node.getClass().getSimpleName(), beginLine, endLine, beginColumn, endColumn)); return true; }
From source file:com.ibm.wala.cast.java.translator.jdt.JDTJava2CAstTranslator.java
License:Open Source License
/** * Only called from createClassDeclaration. * // w ww . jav a2s . com * @param decl * @param context * @return */ private CAstEntity visit(EnumConstantDeclaration decl, WalkContext context) { return new FieldEntity(decl.getName().getIdentifier(), decl.resolveVariable().getType(), enumQuals, makePosition(decl.getStartPosition(), decl.getStartPosition() + decl.getLength()), null); }