Search in sources :

Example 1 with MethodDeclaration

use of org.freud.analysed.javasource.MethodDeclaration in project freud by LMAX-Exchange.

the class ClassDeclarationJdom method getMethodDeclarationListByNameMap.

private void getMethodDeclarationListByNameMap(final JXPathContext context) {
    List<Element> methodDeclElementList = context.selectNodes("//" + FUNCTION_METHOD_DECL.getName() + "|//" + VOID_METHOD_DECL.getName());
    for (Element methodElement : methodDeclElementList) {
        MethodDeclaration methodDeclaration = new MethodDeclarationJdom(methodElement, this);
        final String name = methodDeclaration.getName();
        List<MethodDeclaration> methodDeclarationList = methodDeclarationListByNameMap.get(name);
        if (methodDeclarationList == null) {
            methodDeclarationList = new LinkedList<MethodDeclaration>();
            methodDeclarationListByNameMap.put(name, methodDeclarationList);
        }
        methodDeclarationList.add(methodDeclaration);
    }
}
Also used : MethodDeclaration(org.freud.analysed.javasource.MethodDeclaration) Element(org.jdom.Element)

Aggregations

MethodDeclaration (org.freud.analysed.javasource.MethodDeclaration)1 Element (org.jdom.Element)1