private boolean containsContainer(NodeContainer interI, NodeContainer interJ) { // NodeContainer tmp = interI; if (interI.getInnerModulesList() != null && interI.getInnerModulesList().size() > 0) { if (interI.getInnerModulesList().contains(interJ)) { return true; } else for (int k = 0; k < interI.getInnerModulesList().size(); k++) { // if(tmp.getInnerModulesList().get(k) instanceof NodeContainer) if (containsContainer(interI.getInnerModulesList().get(k), interJ)) return true; } } return false; }
private String getQualifiedName(Node node) { String packageName; if (node instanceof Method) { Method method = (Method) node; packageName = method.getNodeContainer().getPackageName(); if (!packageName.equals("")) packageName += "."; return packageName + method.getNodeContainer().getName() + "." + method.getName(); // + "." +method.getSignature(); } else if (node instanceof Field) { Field field = (Field) node; packageName = field.getNodeContainer().getPackageName(); if (!packageName.equals("")) packageName += "."; return packageName + field.getNodeContainer().getName() + "." + field.getName(); } else if (node instanceof Interface) { Interface interf = (Interface) node; packageName = interf.getPackageName(); if (!packageName.equals("")) packageName += "."; return packageName + interf.getName(); } else if (node instanceof Advice) { Advice advice = (Advice) node; packageName = advice.getNodeContainer().getPackageName(); if (!packageName.equals("")) packageName += "."; return packageName + advice.getNodeContainer().getName() + "." + advice.getKind() + ":" + advice.getPointcutExpression(); } else if (node instanceof Package) { it.unisannio.rcost.callgraphanalyzer.Package pack = (Package) node; NodeContainer n = pack.getNodeContainer(); if (n == null) { String packName = pack.getName(); if (!packName.equals("")) return packName; else return "(default package)"; } return n.getName() + "." + pack.getName(); } return ""; }