IModelSourceLocation sourceLocation = bean.getElementSourceLocation();
if (type != null) {
if (!bean.isAbstract() && !(sourceLocation instanceof JavaModelSourceLocation)) {
if (type.isInterface()) {
context.warning(bean, "CLASS_NOT_CLASS", "Class '" + className + "' is an interface",
new ValidationProblemAttribute("CLASS", className),
new ValidationProblemAttribute("BEAN_NAME", bean.getElementName()));
} else if (type.isClass() && Flags.isAbstract(type.getFlags())) {
context.warning(bean, "CLASS_NOT_CONCRETE", "Class '" + className + "' is abstract ",
new ValidationProblemAttribute("CLASS", className),
new ValidationProblemAttribute("BEAN_NAME", bean.getElementName()));
}
}
} else {
context.error(bean, "CLASS_NOT_FOUND", "Class '" + className + "' not found",
new ValidationProblemAttribute("CLASS", className),
new ValidationProblemAttribute("BEAN_NAME", bean.getElementName()));
}
}
catch (JavaModelException e) {
}
}