if (targetIndex == -1)
{
throw new IllegalArgumentException(target.getName() + " is not an enabled interceptor!");
}
final Priority p1 = src.getAnnotation(Priority.class);
final Priority p2 = target.getAnnotation(Priority.class);
if (p1 != null && p2 != null)
{
return p1.value() - p2.value();
}
if (p1 == null && p2 != null)
{
return -1;
}