Here you can find the source of getMethodNames(NodeList methodNodes)
private static LinkedHashSet<String> getMethodNames(NodeList methodNodes)
//package com.java2s; //License from project: Open Source License import java.util.LinkedHashSet; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { private static LinkedHashSet<String> getMethodNames(NodeList methodNodes) { LinkedHashSet<String> methodsNames = new LinkedHashSet<String>(); for (int i = 0; i < methodNodes.getLength(); i++) { Node methodNode = methodNodes.item(i); String methodName = getMethodName(methodNode); if (methodName != null) { methodsNames.add(methodName); }/*from w w w . j a v a 2s. c o m*/ } return methodsNames; } private static String getMethodName(Node nameNode) { Node firstChild = nameNode.getFirstChild(); if (firstChild == null) { return null; } String nodeValue = firstChild.getNodeValue(); String nameMethod = ""; if (nodeValue != null && !nodeValue.trim().isEmpty()) { nameMethod = nodeValue; } else if (nameNode.getChildNodes().getLength() > 1) { NodeList childNodes2 = nameNode.getChildNodes(); for (int j = 0; j < childNodes2.getLength(); j++) { Node child = childNodes2.item(j); if (!"name".equalsIgnoreCase(child.getNodeName())) { continue; } nameMethod += child.getFirstChild().getNodeValue() + "."; } } return nameMethod; } }