protected static boolean visitBeforeAnnotationsOK(SmooksResourceConfiguration resourceConfig, ContentHandler contentHandler) {
Class<? extends ContentHandler> handlerClass = contentHandler.getClass();
VisitBeforeIf visitBeforeIf = handlerClass.getAnnotation(VisitBeforeIf.class);
if(visitBeforeIf != null) {
MVELExpressionEvaluator conditionEval = new MVELExpressionEvaluator();
conditionEval.setExpression(visitBeforeIf.condition());
return conditionEval.eval(resourceConfig);
}
return true;
}