node.setKind(IProgramElement.Kind.ERROR);
node.setName(AsmRelationshipUtils.DECLARE_UNKNONWN);
}
} else if (methodDeclaration instanceof InterTypeDeclaration) {
InterTypeDeclaration itd = (InterTypeDeclaration) methodDeclaration;
String fqname = itd.getOnType().toString();
if (fqname.indexOf(".") != -1) {
// TODO the string handling round here is embarrassing
node.addFullyQualifiedName(fqname + "." + new String(itd.getDeclaredSelector()));
fqname = fqname.substring(fqname.lastIndexOf(".") + 1);
}
String name = fqname + "." + new String(itd.getDeclaredSelector());
if (methodDeclaration instanceof InterTypeFieldDeclaration) {
node.setKind(IProgramElement.Kind.INTER_TYPE_FIELD);
node.setName(name);
} else if (methodDeclaration instanceof InterTypeMethodDeclaration) {
node.setKind(IProgramElement.Kind.INTER_TYPE_METHOD);
node.setName(name);
} else if (methodDeclaration instanceof InterTypeConstructorDeclaration) {
node.setKind(IProgramElement.Kind.INTER_TYPE_CONSTRUCTOR);
// StringBuffer argumentsSignature = new StringBuffer("fubar");
// argumentsSignature.append("(");
// if (methodDeclaration.arguments!=null && methodDeclaration.arguments.length>1) {
//
// for (int i = 1;i<methodDeclaration.arguments.length;i++) {
// argumentsSignature.append(methodDeclaration.arguments[i]);
// if (i+1<methodDeclaration.arguments.length) argumentsSignature.append(",");
// }
// }
// argumentsSignature.append(")");
// InterTypeConstructorDeclaration itcd = (InterTypeConstructorDeclaration)methodDeclaration;
node.setName(itd.getOnType().toString() + "." + itd.getOnType().toString().replace('.', '_'));
} else {
node.setKind(IProgramElement.Kind.ERROR);
node.setName(name);
}
node.setCorrespondingType(new String(itd.returnType.resolvedType.readableName()));