org.jfree.report.expressions

Class AbstractExpression

public abstract class AbstractExpression extends Object implements Expression

A baseclass for simple, non-positionally parametrized expressions.

Author: Thomas Morgner

Constructor Summary
protected AbstractExpression()
Method Summary
Objectclone()
Clones the expression, expression should be reinitialized after the cloning.
protected DataRowgetDataRow()
Returns the current DataRow.
ExpressiongetInstance()
Return a new instance of this expression.
StringgetName()
Returns the name of the expression.
protected LocalegetParentLocale()
protected ConfigurationgetReportConfiguration()
protected ResourceBundleFactorygetResourceBundleFactory()
ExpressionRuntimegetRuntime()
booleanisDeepTraversing()
booleanisPrecompute()
booleanisPreserve()
voidsetDeepTraversing(boolean deepTraversing)
voidsetName(String name)
Sets the name of the expression.
voidsetPrecompute(boolean precompute)
voidsetPreserve(boolean preserve)
voidsetRuntime(ExpressionRuntime runtime)
Defines the DataRow used in this expression.

Constructor Detail

AbstractExpression

protected AbstractExpression()

Method Detail

clone

public Object clone()
Clones the expression, expression should be reinitialized after the cloning.

Expression maintain no state, cloning is done at the beginning of the report processing to disconnect the used expression from any other object space.

Returns: A clone of this expression.

Throws: CloneNotSupportedException this should never happen.

getDataRow

protected DataRow getDataRow()
Returns the current DataRow.

Returns: the data row.

getInstance

public Expression getInstance()
Return a new instance of this expression. The copy is initialized and uses the same parameters as the original, but does not share any objects.

Returns: a copy of this function.

getName

public String getName()
Returns the name of the expression. An expression without a name cannot be referenced from outside the element.

Returns: the function name.

getParentLocale

protected Locale getParentLocale()

getReportConfiguration

protected Configuration getReportConfiguration()

getResourceBundleFactory

protected ResourceBundleFactory getResourceBundleFactory()

getRuntime

public ExpressionRuntime getRuntime()

isDeepTraversing

public boolean isDeepTraversing()

isPrecompute

public boolean isPrecompute()

isPreserve

public boolean isPreserve()

setDeepTraversing

public void setDeepTraversing(boolean deepTraversing)

setName

public void setName(String name)
Sets the name of the expression.

Parameters: name the name.

setPrecompute

public void setPrecompute(boolean precompute)

setPreserve

public void setPreserve(boolean preserve)

setRuntime

public void setRuntime(ExpressionRuntime runtime)
Defines the DataRow used in this expression. The dataRow is set when the report processing starts and can be used to access the values of functions, expressions and the reports datasource.

Parameters: runtime the runtime information for the expression