IType type = getTypeForValue(jp, value);
if (type != null){
//ensure that it is not abstract or anonymous
if (!isInnerOrAnonymousClass(type) && !isAbstractClass(type)){
//now verify that it meets the criteria
ITypeHierarchy hierarchy;
try {
hierarchy = type.newTypeHierarchy(jp, null);
} catch (JavaModelException e) {
return false;
}
//check that all interfaces
List<String> interfaceNames = getInterfaceNames();
for (Iterator<String> it=interfaceNames.iterator();it.hasNext();){
//check that all interfaces are satisfied by type
IType interfase = getTypeForValue(jp, it.next());
if (interfase == null){
addNewValidationMessage(Messages.JavaClassType_not_found);
return false;
}
else if (! containsType(hierarchy.getAllSupertypes(type), interfase)){
addNewValidationMessage(Messages.JavaClassType_not_found);
return false;
}
}
//interfaces have been satisfied now check the superclass if specified
IType superClass = getSuperClass(jp);
if (superClass != null && superClass.equals(type))
return true;
else if (superClass != null && !containsType(hierarchy.getAllSuperclasses(type), superClass )){
addNewValidationMessage(Messages.JavaClassType_not_found);
return false;
}
return true;
// List results = getTypes();