TEvaluator
- The type of the created evaluator.public abstract static class EvaluatorGroup.Callback0<TEvaluator> extends Delegate
Modifier and Type | Class and Description |
---|---|
static interface |
EvaluatorGroup.Callback0.Function<TEvaluator>
A functional interface for the containing delegate type.
|
Constructor and Description |
---|
Callback0()
Creates a new instance of this delegate.
|
Callback0(Class<?> targetClass,
String methodName,
Class<?>... methodParameterClasses)
Initializes a delegate that will invoke a static method on a class.
|
Callback0(Object targetObject,
String methodName,
Class<?>... methodParameterClasses)
Initializes a delegate that will invoke an instance method on a class instance.
|
Modifier and Type | Method and Description |
---|---|
abstract TEvaluator |
invoke(EvaluatorGroup group)
A delegate for a method that takes no creation parameters (other than the EvaluatorGroup) and returns an evaluator.
|
static <TEvaluator> |
of(EvaluatorGroup.Callback0.Function<TEvaluator> f)
Create a delegate for the given interface.
|
static <TEvaluator> |
of(EvaluatorGroup.Callback0.Function<TEvaluator> f,
Class<?> targetClass,
String methodName,
Class<?>... methodParameterClasses)
Create a delegate for the given interface.
|
static <TEvaluator> |
of(EvaluatorGroup.Callback0.Function<TEvaluator> f,
Object targetObject,
String methodName,
Class<?>... methodParameterClasses)
Create a delegate for the given interface.
|
public Callback0()
public Callback0(@Nonnull Object targetObject, @Nonnull String methodName, @Nonnull Class<?>... methodParameterClasses)
targetObject
- The class instance on which the delegate will invoke the method.methodName
- The name of the instance method.methodParameterClasses
- The type of the parameters of the instance method.public Callback0(@Nonnull Class<?> targetClass, @Nonnull String methodName, @Nonnull Class<?>... methodParameterClasses)
targetClass
- The class that defines the method.methodName
- The name of the static method.methodParameterClasses
- The type of the parameters of the static method.@Nonnull public abstract TEvaluator invoke(@Nonnull EvaluatorGroup group)
group
- The group with which to associate the new evaluator. By grouping evaluators
that are often evaluated at the same Julian dates, common computations can be performed only once
for the entire group instead of multiple times for each evaluator.@Nonnull public static <TEvaluator> EvaluatorGroup.Callback0<TEvaluator> of(@Nonnull EvaluatorGroup.Callback0.Function<TEvaluator> f)
f
- The function which will be invoked.@Nonnull public static <TEvaluator> EvaluatorGroup.Callback0<TEvaluator> of(@Nonnull EvaluatorGroup.Callback0.Function<TEvaluator> f, @Nonnull Object targetObject, @Nonnull String methodName, @Nonnull Class<?>... methodParameterClasses)
f
- The function which will be invoked.targetObject
- The class instance on which the delegate will invoke the method.methodName
- The name of the instance method.methodParameterClasses
- The type of the parameters of the instance method.@Nonnull public static <TEvaluator> EvaluatorGroup.Callback0<TEvaluator> of(@Nonnull EvaluatorGroup.Callback0.Function<TEvaluator> f, @Nonnull Class<?> targetClass, @Nonnull String methodName, @Nonnull Class<?>... methodParameterClasses)
f
- The function which will be invoked.targetClass
- The class that defines the method.methodName
- The name of the static method.methodParameterClasses
- The type of the parameters of the static method.