Examples of ScriptEvaluator


Examples of org.codehaus.janino.ScriptEvaluator

  protected ScriptEvaluator getEvaluator( Class returnType, String[] parameterNames, Class[] parameterTypes )
    {
    try
      {
      return new ScriptEvaluator( block, returnType, parameterNames, parameterTypes );
      }
    catch( CompileException exception )
      {
      throw new OperationException( "could not compile script: " + block, exception );
      }
View Full Code Here

Examples of org.codehaus.janino.ScriptEvaluator

  @Override
  public void start() {
    try {
      assert context != null;
      scriptEvaluator = new ScriptEvaluator(getDecoratedExpression(), EXPRESSION_TYPE,
          getParameterNames(), getParameterTypes(), THROWN_EXCEPTIONS);
      super.start();
    } catch (Exception e) {
      addError(
          "Could not start evaluator with expression [" + expression + "]", e);
View Full Code Here

Examples of org.hibernate.validator.constraints.impl.scriptassert.ScriptEvaluator

    this.alias = constraintAnnotation.alias();
  }

  public boolean isValid(Object value, ConstraintValidatorContext constraintValidatorContext) {

    ScriptEvaluator scriptEvaluator = ScriptEvaluatorFactory.getInstance()
        .getScriptEvaluatorByLanguageName( languageName );

    return scriptEvaluator.evaluate( script, value, alias );
  }
View Full Code Here

Examples of org.hibernate.validator.internal.util.scriptengine.ScriptEvaluator

    }

    public boolean isValid(Object value, ConstraintValidatorContext constraintValidatorContext) {

        Object evaluationResult;
        ScriptEvaluator scriptEvaluator;

        try {
            ScriptEvaluatorFactory evaluatorFactory = ScriptEvaluatorFactory.getInstance();
            scriptEvaluator = evaluatorFactory.getScriptEvaluatorByLanguageName( languageName );
        }
        catch ( ScriptException e ) {
            throw new ConstraintDeclarationException( e );
        }

        try {
            evaluationResult = scriptEvaluator.evaluate( script, value, alias );
        }
        catch ( ScriptException e ) {
            throw log.getErrorDuringScriptExecutionException( script, e );
        }
View Full Code Here

Examples of org.hibernate.validator.internal.util.scriptengine.ScriptEvaluator

    }

    public boolean isValid(Object value, ConstraintValidatorContext constraintValidatorContext) {

        Object evaluationResult;
        ScriptEvaluator scriptEvaluator;

        try {
            ScriptEvaluatorFactory evaluatorFactory = ScriptEvaluatorFactory.getInstance();
            scriptEvaluator = evaluatorFactory.getScriptEvaluatorByLanguageName( languageName );
        }
        catch ( ScriptException e ) {
            throw new ConstraintDeclarationException( e );
        }

        try {
            evaluationResult = scriptEvaluator.evaluate( script, value, alias );
        }
        catch ( ScriptException e ) {
            throw log.getErrorDuringScriptExecutionException( script, e );
        }
View Full Code Here

Examples of org.hibernate.validator.internal.util.scriptengine.ScriptEvaluator

    }

    public boolean isValid(Object[] value, ConstraintValidatorContext constraintValidatorContext) {

        Object evaluationResult;
        ScriptEvaluator scriptEvaluator;

        try {
            ScriptEvaluatorFactory evaluatorFactory = ScriptEvaluatorFactory.getInstance();
            scriptEvaluator = evaluatorFactory.getScriptEvaluatorByLanguageName( languageName );
        }
        catch ( ScriptException e ) {
            throw new ConstraintDeclarationException( e );
        }

        try {
            evaluationResult = scriptEvaluator.evaluate( script, value, alias );
        }
        catch ( ScriptException e ) {
            throw log.getErrorDuringScriptExecutionException( script, e );
        }
View Full Code Here

Examples of org.hibernate.validator.internal.util.scriptengine.ScriptEvaluator

  }

  public boolean isValid(Object value, ConstraintValidatorContext constraintValidatorContext) {

    Object evaluationResult;
    ScriptEvaluator scriptEvaluator;

    try {
      ScriptEvaluatorFactory evaluatorFactory = ScriptEvaluatorFactory.getInstance();
      scriptEvaluator = evaluatorFactory.getScriptEvaluatorByLanguageName( languageName );
    }
    catch ( ScriptException e ) {
      throw new ConstraintDeclarationException( e );
    }

    try {
      evaluationResult = scriptEvaluator.evaluate( script, value, alias );
    }
    catch ( ScriptException e ) {
      throw log.getErrorDuringScriptExecutionException( script, e );
    }
View Full Code Here

Examples of org.hibernate.validator.util.scriptengine.ScriptEvaluator

  }

  public boolean isValid(Object value, ConstraintValidatorContext constraintValidatorContext) {

    Object evaluationResult;
    ScriptEvaluator scriptEvaluator;

    try {
      ScriptEvaluatorFactory evaluatorFactory = ScriptEvaluatorFactory.getInstance();
      scriptEvaluator = evaluatorFactory.getScriptEvaluatorByLanguageName( languageName );
    }
    catch ( ScriptException e ) {
      throw new ConstraintDeclarationException( e );
    }

    try {
      evaluationResult = scriptEvaluator.evaluate( script, value, alias );
    }
    catch ( ScriptException e ) {
      throw new ConstraintDeclarationException(
          "Error during execution of script \"" + script + "\" occurred.", e
      );
View Full Code Here

Examples of org.jmol.script.ScriptEvaluator

  }

  private BitSet getSelectionSet(String script) {
    try {
      if (eval == null)
        eval = new ScriptEvaluator(viewer);
      return viewer.getAtomBitSet(eval, script);
    } catch (Exception e) {
      // ignore
    }
    return null;
View Full Code Here

Examples of org.jmol.script.ScriptEvaluator

    repaintManager = new RepaintManager(this, shapeManager);
    initialize();
    fileManager = new FileManager(this);
    compiler = new ScriptCompiler(this);
    definedAtomSets = new Hashtable();
    eval = new ScriptEvaluator(this);
  }
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.