public abstract class AbstractEvaluatorFactory extends Object implements EvaluatorFactory
Modifier and Type | Field and Description |
---|---|
protected ClassLoader |
loader |
Constructor and Description |
---|
AbstractEvaluatorFactory() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
compile(String source,
ClassType projection,
String[] names,
Type[] types,
String id,
Map<String,Object> constants) |
<T> Evaluator<T> |
createEvaluator(String source,
Class<? extends T> projectionType,
String[] names,
Class<?>[] classes,
Map<String,Object> constants) |
<T> Evaluator<T> |
createEvaluator(String source,
ClassType projection,
String[] names,
Type[] types,
Class<?>[] classes,
Map<String,Object> constants)
Create a new Evaluator instance
|
protected String |
createSource(String source,
ClassType projectionType,
String[] names,
Type[] types,
String id,
Map<String,Object> constants) |
protected Method |
findEvalMethod(Class<?> clazz) |
protected String |
toId(String source,
Class<?> returnType,
Type[] types,
Collection<Object> constants) |
protected ClassLoader loader
protected abstract void compile(String source, ClassType projection, String[] names, Type[] types, String id, Map<String,Object> constants) throws IOException
source
- projection
- names
- types
- id
- constants
- IOException
protected String createSource(String source, ClassType projectionType, String[] names, Type[] types, String id, Map<String,Object> constants) throws IOException
source
- projectionType
- names
- types
- id
- constants
- IOException
public <T> Evaluator<T> createEvaluator(String source, Class<? extends T> projectionType, String[] names, Class<?>[] classes, Map<String,Object> constants)
createEvaluator
in interface EvaluatorFactory
public <T> Evaluator<T> createEvaluator(String source, ClassType projection, String[] names, Type[] types, Class<?>[] classes, Map<String,Object> constants)
createEvaluator
in interface EvaluatorFactory
T
- projection typesource
- expression in Java source code formprojection
- type of the source expressionnames
- names of the argumentstypes
- types of the argumentsconstants
- Copyright © 2010–2023. All rights reserved.