String iname = interceptorElement.getAttribute("name");
if (iname == null || iname.length() == 0)
{
throw new RuntimeException("name must be specified for interceptor-ref in precedence declaration");
}
precedenceEntries.add(new PrecedenceDefEntry(iname, null));
}
else if (tag2.equals("advice"))
{
String method = interceptorElement.getAttribute("name");
String aspect = interceptorElement.getAttribute("aspect");
if (method == null || method.length() == 0)
{
throw new RuntimeException("name must be specified for advice in precedence declaration");
}
if (aspect == null || aspect.length() == 0)
{
throw new RuntimeException("aspect must be specified for advice in precedence declaration");
}
precedenceEntries.add(new PrecedenceDefEntry(aspect, method));
}
else
{
throw new RuntimeException("Invalid child element of precedence : " + tag2);
}