org.apache.jmeter.util

## Class BeanShellInterpreter

- java.lang.Object
- - org.apache.jmeter.util.BeanShellInterpreter

-     public class BeanShellInterpreter
      extends java.lang.Object

  BeanShell setup function - encapsulates all the access to the BeanShell Interpreter in a single class. The class uses dynamic class loading to access BeanShell, which means that all the source files can be built without needing access to the bsh jar. If the beanshell jar is not present at run-time, an error will be logged

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BeanShellInterpreter()`
    `BeanShellInterpreter(java.lang.String init, org.slf4j.Logger log)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `eval(java.lang.String s)`
    `java.lang.Object` | `evalNoLog(java.lang.String s)`
    `java.lang.Object` | `get(java.lang.String s)`
    `static boolean` | `isInterpreterPresent()`
    `void` | `reset()` Resets the BeanShell interpreter.
    `java.lang.Object` | `set(java.lang.String s, boolean b)`
    `java.lang.Object` | `set(java.lang.String s, java.lang.Object o)`
    `java.lang.Object` | `source(java.lang.String s)`

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

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

- - ### Constructor Detail

    - #### BeanShellInterpreter

          public BeanShellInterpreter()
                               throws java.lang.ClassNotFoundException

      Throws:
        `java.lang.ClassNotFoundException`

    - #### BeanShellInterpreter

          public BeanShellInterpreter(java.lang.String init,
                                      org.slf4j.Logger log)
                               throws java.lang.ClassNotFoundException

      Parameters:
        `init` - initialisation file
        `log` - logger to pass to interpreter
      Throws:
        `java.lang.ClassNotFoundException` - when beanshell can not be instantiated

  - ### Method Detail

    - #### reset

          public void reset()
                     throws java.lang.ClassNotFoundException

      Resets the BeanShell interpreter.
      Throws:
        `java.lang.ClassNotFoundException` - if interpreter cannot be instantiated

    - #### eval

          public java.lang.Object eval(java.lang.String s)
                                throws JMeterException

      Throws:
        `JMeterException`

    - #### evalNoLog

          public java.lang.Object evalNoLog(java.lang.String s)
                                     throws JMeterException

      Throws:
        `JMeterException`

    - #### set

          public java.lang.Object set(java.lang.String s,
                                      java.lang.Object o)
                               throws JMeterException

      Throws:
        `JMeterException`

    - #### set

          public java.lang.Object set(java.lang.String s,
                                      boolean b)
                               throws JMeterException

      Throws:
        `JMeterException`

    - #### source

          public java.lang.Object source(java.lang.String s)
                                  throws JMeterException

      Throws:
        `JMeterException`

    - #### get

          public java.lang.Object get(java.lang.String s)
                               throws JMeterException

      Throws:
        `JMeterException`

    - #### isInterpreterPresent

          public static boolean isInterpreterPresent()

Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.