Class JREvaluator

  • All Implemented Interfaces:
    DatasetExpressionEvaluator
    Direct Known Subclasses:
    DirectEvaluator, GroovyEvaluator, JavaScriptCompiledEvaluator, JavaScriptEvaluator

    public abstract class JREvaluator
    extends Object
    implements DatasetExpressionEvaluator
    Base class for the dynamically generated expression evaluator classes. This class also provides some built-in functions that will be described next.

    Built-in Functions

    Report expressions can perform method calls on various objects that are available during report filling, such as parameters, fields, or variable values, but can also call methods on a special object that is already available as the this reference. This is the calculator object. It has public utility methods that are ready to use inside report expressions.

    Currently, there are only a few utility methods of the calculator object available as built-in functions inside report expressions. These are the following:

    • msg - this function offers a convenient way to format messages based on the current report locale, just as you would normally do when using a java.text.MessageFormat instance. Furthermore, several signatures for this function take up to three message parameters in order to make the formatting functionality easier to use.
    • str - this function is the equivalent of the $R{} syntax. It gives access to locale specific resources from the associated resource bundle.
    Author:
    Lucian Chirita (lucianc@users.sourceforge.net)