use of org.freud.analysed.javasource.ImportDeclaration in project freud by LMAX-Exchange.
the class JavaSourceJdom method parseImportDeclaration.
private List<ImportDeclaration> parseImportDeclaration() {
try {
final JXPathContext context = JXPathContext.newContext(root);
final List importNodes = context.selectNodes("/" + JAVA_SOURCE_ROOT_ELEMENT_NAME + "/" + JavaSourceTokenType.IMPORT.name());
importDeclarations = new ArrayList<ImportDeclaration>(importNodes.size());
for (Object importNode : importNodes) {
importDeclarations.add(new ImportDeclarationJdom((Element) importNode));
}
} catch (JXPathException e) {
importDeclarations = emptyList();
}
return importDeclarations;
}
Aggregations