in resolver/src/main/java/org/apache/james/jspf/impl/DefaultTermsFactory.java [130:153]
public Object createTerm(Class<?> termDef, Configuration subres) throws PermErrorException, InstantiationException {
try {
Object term = termDef.newInstance();
try {
wiringService.wire(term);
} catch (WiringServiceException e) {
throw new InstantiationException(
"Unexpected error adding dependencies to term: " + e.getMessage());
}
if (term instanceof ConfigurationEnabled) {
if (subres == null || subres.groupCount() == 0) {
((ConfigurationEnabled) term).config(null);
} else {
((ConfigurationEnabled) term).config(subres);
}
}
return term;
} catch (IllegalAccessException e) {
throw new InstantiationException(
"Unexpected error creating term: " + e.getMessage());
}
}