Interface IExpressionObjectFactory
-
- All Known Implementing Classes:
StandardExpressionObjectFactory
public interface IExpressionObjectFactoryFactory objects for creating
IExpressionObjectsinstances. These factories are the artifacts specified byIExpressionObjectDialectimplementations, instead of specifying the expression objects themselves, so that these expression objects are only created when really needed in template expressions.- Since:
- 3.0.0
- Author:
- Daniel Fernández
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectbuildObject(IExpressionContext context, String expressionObjectName)Build the requested object.Set<String>getAllExpressionObjectNames()Return the complete list of expression objects that can be created by this factory.booleanisCacheable(String expressionObjectName)Returns whether a specific expression object can be cached and reused for all expressions in the same template execution or not.
-
-
-
Method Detail
-
getAllExpressionObjectNames
Set<String> getAllExpressionObjectNames()
Return the complete list of expression objects that can be created by this factory.
This list will be used for determining if a factory might actually be asked to build an object, so it should contain all possible objects to be built by the factory.
- Returns:
- the list of objects this factory can build.
-
buildObject
Object buildObject(IExpressionContext context, String expressionObjectName)
Build the requested object.
- Parameters:
context- the context being used for processing the template.expressionObjectName- the name of the expression object to be built.- Returns:
- the built object, or
nullif the object could not be built.
-
isCacheable
boolean isCacheable(String expressionObjectName)
Returns whether a specific expression object can be cached and reused for all expressions in the same template execution or not.
Note this cacheable flag refers only to reuse of the object in expressions in expressions executed during a single template execution.
- Parameters:
expressionObjectName- the name of the expression object.- Returns:
trueis the object is to be considered cacheable,falseif not.
-
-