public class MethodInvokerContainer extends Object implements Container<Object>
Method data source container, specify any method without parameters
or the first parameter is Collection type method,
and adapt it to a data source container.
This container is generally not created directly by users,
but is used in conjunction with MethodContainerFactory to scan the methods
in a large number of specific context objects in the framework
according to annotations or specific configurations,
automatically adapt them to data source containers and register them.
If only a few known methods need to be used as data sources,
you can directly use LambdaContainer.
MethodContainerFactory,
MethodInvokerContainerCreator,
MappingType| 限定符和类型 | 类和说明 |
|---|---|
static interface |
MethodInvokerContainer.KeyExtractor
The key value extractor is used to obtain the key value from the data source object.
|
Container.LifecycleEMPTY_CONTAINER_NAMESPACE| 构造器和说明 |
|---|
MethodInvokerContainer(String namespace,
MethodInvoker methodInvoker,
Object methodSource,
MethodInvokerContainer.KeyExtractor keyExtractor,
MappingType mappingType)
Build a method data source container.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Map<Object,?> |
get(Collection<Object> keys)
Enter a batch of key values to return data source objects grouped by key values.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitempty, getNamespacepublic MethodInvokerContainer(String namespace, MethodInvoker methodInvoker, Object methodSource, MethodInvokerContainer.KeyExtractor keyExtractor, MappingType mappingType)
namespace - namespacemethodInvoker - method to callmethodSource - object to be calledkeyExtractor - key value extraction method of the data source objectmappingType - mapping relationship between the object returned by the method and the target objectCopyright © 2023. All rights reserved.