Examples of EvaluableJoinPoint


Examples of com.codingcrayons.aspectfaces.annotation.registration.pointCut.EvaluableJoinPoint

  public void setApplicableForEvaluable(AnnotationProvider provider) throws EvaluatorException {
    if (!isMetaPropertyApplicable()) {
      return;
    }

    EvaluableJoinPoint evaluable = AnnotationContainer.getInstance().getEvaluableAnnotation(provider.getName());
    if (evaluable != null && this.context.getConfiguration().getEvaluatorClassName() != null) {

      Evaluator evaluator;
      try {
        evaluator = (Evaluator) Class.forName(context.getConfiguration().getEvaluatorClassName()).newInstance();
      } catch (InstantiationException e) {
        throw new EvaluatorException("Evaluator " + context.getConfiguration().getEvaluatorClassName()
          + "can not be instantiated", e);
      } catch (IllegalAccessException e) {
        throw new EvaluatorException("Evaluator " + context.getConfiguration().getEvaluatorClassName()
          + "can not be instantiated", e);
      } catch (ClassNotFoundException e) {
        throw new EvaluatorException("Evaluator class " + context.getConfiguration().getEvaluatorClassName()
          + " not found", e);
      }

      if (!evaluator.evaluate(evaluable.getEvaluableValue(provider))) {
        this.metaProperty.setApplicable(false);
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.