public boolean evaluate(Object object)
{
boolean hasException = object instanceof DependencyFacade;
if (hasException)
{
DependencyFacade dependency = (DependencyFacade)object;
// first check for exception references
hasException = dependency.hasStereotype(UMLProfile.STEREOTYPE_EXCEPTION_REF);
// if there wasn't any exception reference
// now check for actual exceptions
if (!hasException)
{
ModelElementFacade targetElement = dependency.getTargetElement();
hasException = targetElement != null && targetElement.hasStereotype(
UMLProfile.STEREOTYPE_EXCEPTION);
}
}
return hasException;