}
}
}
catch (JavaModelException e) {
}
ClassMethodReferenceNode node = new ClassMethodReferenceNode(type, me);
List<IAopReference> references = Activator.getModel().getAllReferences();
// fields
try {
for (IField field : type.getFields()) {
Object[] obj = getChildren(field);
if (obj != null && obj.length > 0) {
for (Object o : obj) {
node.getDeclareParentReferences().add((IReferenceNode) o);
}
}
}
}
catch (JavaModelException e) {
}
for (IAopReference reference : references) {
if (reference.getAdviceType() == ADVICE_TYPE.DECLARE_PARENTS) {
if (reference.getTarget().equals(type)) {
node.getDeclaredOnReferences().add(reference);
}
}
}
// add bean references
Set<IBeansConfig> configs = BeansCorePlugin.getModel().getConfigs(type.getFullyQualifiedName());
Set<String> beans = new HashSet<String>();
for (IBeansConfig config : configs) {
List<IBean> pBeans = new ArrayList<IBean>();
pBeans.addAll(config.getBeans());
pBeans.addAll(BeansModelUtils.getInnerBeans(config));
for (IBean b : pBeans) {
if (type.getFullyQualifiedName().equals(BeansModelUtils.getBeanClass(b, config))) {
beans.add(b.getElementID());
}
}
}
node.setBeans(beans);
return new Object[] { node };
}
else if (parentElement instanceof IMethod) {
IMethod method = (IMethod) parentElement;
List<IAopReference> references = Activator.getModel().getAllReferences();