public class InjectionStrategyClassNewInstance extends java.lang.Object implements InjectionStrategy
Constructor and Description |
---|
InjectionStrategyClassNewInstance(java.lang.Class clazz)
The class to be instantiated.
|
InjectionStrategyClassNewInstance(java.lang.String fullyQualifiedClassName)
The class name of the class to be instantiated.
|
Modifier and Type | Method and Description |
---|---|
InjectionStrategyClassNewInstance |
addConstant(java.lang.String name,
java.lang.Object value)
Add a constant to be provided by invoking the setter method of the class, at deployment time
|
InjectionStrategyClassNewInstance |
addExpression(java.lang.String name,
com.espertech.esper.common.internal.epl.expression.core.ExprNode value)
Add an expression to be provided by invoking the setter method of the class, at deployment time,
the setter should accept an
ExprEvaluator instance. |
java.util.function.Consumer<com.espertech.esper.common.internal.context.aifactory.core.SAIFFInitializeBuilder> |
getBuilderConsumer()
Returns the builder consumer, a consumer that the strategy invokes when it is ready to build the code
|
java.lang.Class |
getClazz()
Returns the class, or null if providing a class name instead
|
java.lang.String |
getFullyQualifiedClassName()
Returns the class name, or null if providing a class instead
|
com.espertech.esper.common.internal.bytecodemodel.model.expression.CodegenExpression |
getInitializationExpression(com.espertech.esper.common.internal.bytecodemodel.base.CodegenClassScope classScope)
Returns the initialization expression
|
void |
setBuilderConsumer(java.util.function.Consumer<com.espertech.esper.common.internal.context.aifactory.core.SAIFFInitializeBuilder> builderConsumer)
Sets the builder consumer, a consumer that the strategy invokes when it is ready to build the code
|
public InjectionStrategyClassNewInstance(java.lang.Class clazz)
clazz
- classpublic InjectionStrategyClassNewInstance(java.lang.String fullyQualifiedClassName)
fullyQualifiedClassName
- class namepublic java.lang.Class getClazz()
public java.lang.String getFullyQualifiedClassName()
public InjectionStrategyClassNewInstance addConstant(java.lang.String name, java.lang.Object value)
name
- property namevalue
- constant valuepublic InjectionStrategyClassNewInstance addExpression(java.lang.String name, com.espertech.esper.common.internal.epl.expression.core.ExprNode value)
ExprEvaluator
instance.name
- property namevalue
- expressionpublic java.util.function.Consumer<com.espertech.esper.common.internal.context.aifactory.core.SAIFFInitializeBuilder> getBuilderConsumer()
public void setBuilderConsumer(java.util.function.Consumer<com.espertech.esper.common.internal.context.aifactory.core.SAIFFInitializeBuilder> builderConsumer)
builderConsumer
- builder consumerpublic com.espertech.esper.common.internal.bytecodemodel.model.expression.CodegenExpression getInitializationExpression(com.espertech.esper.common.internal.bytecodemodel.base.CodegenClassScope classScope)
InjectionStrategy
getInitializationExpression
in interface InjectionStrategy
classScope
- the class scope