net.sf.jasperreports.compilers

## Class JRBshEvaluator

- java.lang.Object
- - net.sf.jasperreports.engine.fill.JREvaluator
  - - net.sf.jasperreports.compilers.JRBshEvaluator

- All Implemented Interfaces:
    DatasetExpressionEvaluator

      public class JRBshEvaluator
      extends JREvaluator

  BeanShell expression evaluator that compiles expressions at fill time.
  Version:
    $Id: JRBshEvaluator.java 6996 2014-04-01 13:21:37Z shertage $
  Author:
    Teodor Danciu (teodord@users.sourceforge.net)
  See Also:
    `JRBshCompiler`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JRBshEvaluator(java.lang.String bshScript)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `customizedInit(java.util.Map<java.lang.String,JRFillParameter> pars, java.util.Map<java.lang.String,JRFillField> fldsm, java.util.Map<java.lang.String,JRFillVariable> varsm)` Initializes the parameters, fields and variables of the evaluator.
    `protected java.lang.Object` | `evaluate(int id)` Evaluates an expression using current fields and variables values.
    `protected java.lang.Object` | `evaluateEstimated(int id)` Evaluates an expression using estimated variables values.
    `protected java.lang.Object` | `evaluateOld(int id)` Evaluates an expression using old fields and variables values.
    `<T> void` | `verify(java.util.Collection<T> expressions)`

    - ### Methods inherited from class net.sf.jasperreports.engine.fill.JREvaluator

      `evaluate, evaluateEstimated, evaluateOld, getFunctionSupport, handleMissingResource, init, msg, msg, msg, msg, str`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JRBshEvaluator

          public JRBshEvaluator(java.lang.String bshScript)
                         throws JRException

      Throws:
        `JRException`

  - ### Method Detail

    - #### verify

          public <T> void verify(java.util.Collection<T> expressions)
                      throws JRException

      Throws:
        `JRException`

    - #### customizedInit

          protected void customizedInit(java.util.Map<java.lang.String,JRFillParameter> pars,
                            java.util.Map<java.lang.String,JRFillField> fldsm,
                            java.util.Map<java.lang.String,JRFillVariable> varsm)
                                 throws JRException

      Description copied from class: `JREvaluator`
      Initializes the parameters, fields and variables of the evaluator.
      Specified by:
        `customizedInit` in class `JREvaluator`
      Parameters:
        `pars` - the parameters indexed by name
        `fldsm` - the fields indexed by name
        `varsm` - the variables indexed by name
      Throws:
        `JRException`

    - #### evaluateOld

          protected java.lang.Object evaluateOld(int id)
                                          throws java.lang.Throwable

      Description copied from class: `JREvaluator`
      Evaluates an expression using old fields and variables values.
      Specified by:
        `evaluateOld` in class `JREvaluator`
      Parameters:
        `id` - the expression id
      Returns:
        the result of the evaluation
      Throws:
        `java.lang.Throwable`
      See Also:
        `JRExpression.EVALUATION_OLD`, `JRFillVariable.getOldValue()`, `JRFillField.getOldValue()`

    - #### evaluateEstimated

          protected java.lang.Object evaluateEstimated(int id)
                                                throws java.lang.Throwable

      Description copied from class: `JREvaluator`
      Evaluates an expression using estimated variables values.
      Specified by:
        `evaluateEstimated` in class `JREvaluator`
      Parameters:
        `id` - the expression id
      Returns:
        the result of the evaluation
      Throws:
        `java.lang.Throwable`
      See Also:
        `JRExpression.EVALUATION_ESTIMATED`, `JRFillVariable.getEstimatedValue()`

    - #### evaluate

          protected java.lang.Object evaluate(int id)
                                       throws java.lang.Throwable

      Description copied from class: `JREvaluator`
      Evaluates an expression using current fields and variables values.
      Specified by:
        `evaluate` in class `JREvaluator`
      Parameters:
        `id` - the expression id
      Returns:
        the result of the evaluation
      Throws:
        `java.lang.Throwable`
      See Also:
        `JRExpression.EVALUATION_DEFAULT`, `JRFillVariable.getValue()`, `JRFillField.getValue()`

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com