Class JexlScriptEngine.Factory
java.lang.Object
org.apache.commons.jexl3.scripting.JexlScriptEngineFactory
org.apache.commons.jexl3.scripting.JexlScriptEngine.Factory
- All Implemented Interfaces:
ScriptEngineFactory
- Enclosing class:
- JexlScriptEngine
A factory that shares the JexlEngine instance between all JexlScriptEngine instances it creates.
All JexlScriptEngine instances created by this factory share the same JexlEngine instance and JexlUberspect instance.
To create a JexlScriptEngine with a different JexlEngine instance,
use the JexlScriptEngine(JexlScriptEngineFactory) constructor.
- Since:
- 3.3
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFactory()Default constructor.Factory(JexlPermissions permissions) For specialization. -
Method Summary
Modifier and TypeMethodDescriptionprotected JexlEngineCreates an engine.(package private) voidsetEngine(JexlEngine engine) Sets the shared engine instance.Methods inherited from class org.apache.commons.jexl3.scripting.JexlScriptEngineFactory
createJexlEngine, getEngineName, getEngineVersion, getExtensions, getLanguageName, getLanguageVersion, getMethodCallSyntax, getMimeTypes, getNames, getOutputStatement, getParameter, getProgram, getScriptEngine, setDefaultPermissions
-
Field Details
-
jexl
The shared engine instance.A single JEXL engine and JexlUberspect is shared by all instances of JexlScriptEngine created by this factory.
-
-
Constructor Details
-
Factory
public Factory()Default constructor. -
Factory
For specialization.- Parameters:
permissions- The permissions to use for the engine
-
-
Method Details
-
getEngine
Description copied from class:JexlScriptEngineFactoryCreates an engine.- Overrides:
getEnginein classJexlScriptEngineFactory- Returns:
- The JexlEngine instance, create it if necessary
-
setEngine
Sets the shared engine instance.- Parameters:
engine- The engine
-