private Rule createRule(AbstractCompiler compiler, Requirement requirement)
throws InvalidRequirementSpec {
try {
Class<Rule> custom = getRuleClass(requirement.getJavaClass());
Constructor<?> ctor = getRuleConstructor(custom);
Rule rule;
try {
rule = (Rule) (ctor.newInstance(compiler, requirement));
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
if (cause instanceof InvalidRequirementSpec) {