public class BSFExpression extends AbstractExpression
Constructor and Description |
---|
BSFExpression()
Default constructor, create a new BeanShellExpression.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clones the expression and reinitializes the script.
|
protected org.apache.bsf.BSFManager |
createInterpreter()
Creates a new interpreter instance.
|
String |
getExpression()
Returns the script that gets evaluated every time the getValue() method is called.
|
String |
getLanguage()
Returns the programming language, in which the interpreter work.
|
String |
getScript()
Returns the script.
|
Object |
getValue()
Evaluates the defined expression.
|
protected void |
initializeInterpreter(org.apache.bsf.BSFManager interpreter)
Initializes the Bean-Scripting Framework manager.
|
protected void |
invalidate()
Invalidates the interpreter-cache and forces a reinterpretation of the script.
|
void |
setExpression(String expression)
Sets the script that should be executed.
|
void |
setLanguage(String language)
Defines the programming language of the script and expression.
|
void |
setScript(String script)
Defines the script.
|
getDataRow, getDependencyLevel, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime
public BSFExpression()
protected org.apache.bsf.BSFManager createInterpreter()
protected void initializeInterpreter(org.apache.bsf.BSFManager interpreter) throws org.apache.bsf.BSFException
interpreter
- the BSF-Manager that should be initialized.org.apache.bsf.BSFException
- if an error occured.public Object getValue()
public Object clone() throws CloneNotSupportedException
clone
in interface Expression
clone
in class AbstractExpression
CloneNotSupportedException
- this should never happen.public String getExpression()
protected void invalidate()
public void setExpression(String expression)
expression
- the script.public String getLanguage()
public void setLanguage(String language)
language
- the programming language of the script.public String getScript()
public void setScript(String script)
script
- an initialization script.Copyright © 2017 Hitachi Vantara. All rights reserved.