public class DefaultMethodContainerFactory extends Object implements MethodContainerFactory
The basic implementation of MethodContainerFactory,
build the method data source according to the method annotated by ContainerMethod.
ContainerMethod,
MethodInvokerContainer,
MethodInvokerContainerCreator| 限定符和类型 | 字段和说明 |
|---|---|
protected AnnotationFinder |
annotationFinder |
protected MethodInvokerContainerCreator |
methodInvokerContainerCreator |
DEFAULT_METHOD_CONTAINER_FACTORY_ORDER| 构造器和说明 |
|---|
DefaultMethodContainerFactory(MethodInvokerContainerCreator methodInvokerContainerCreator,
AnnotationFinder annotationFinder)
Create a
MethodContainerFactory instance. |
| 限定符和类型 | 方法和说明 |
|---|---|
List<Container<Object>> |
get(@Nullable Object source,
Method method,
Collection<ContainerMethod> annotations)
Adapt methods to data source containers.
|
int |
getSort()
Gets the sorting value.
|
boolean |
support(@Nullable Object source,
Method method,
Collection<ContainerMethod> annotations)
Whether the method is supported.
|
protected final MethodInvokerContainerCreator methodInvokerContainerCreator
protected final AnnotationFinder annotationFinder
public DefaultMethodContainerFactory(MethodInvokerContainerCreator methodInvokerContainerCreator, AnnotationFinder annotationFinder)
MethodContainerFactory instance.methodInvokerContainerCreator - method invoker container creatorannotationFinder - annotation finderpublic int getSort()
Gets the sorting value.
The smaller the value, the higher the priority of the object.
public boolean support(@Nullable Object source, Method method, Collection<ContainerMethod> annotations)
support 在接口中 MethodContainerFactorysource - method's calling objectmethod - methodannotations - annotationspublic List<Container<Object>> get(@Nullable Object source, Method method, Collection<ContainerMethod> annotations)
get 在接口中 MethodContainerFactorysource - method's calling objectmethod - methodannotations - annotationsCopyright © 2024. All rights reserved.