T
- the target typepublic class AnnotatedHandlerInspector<T> extends Object
T
that uses annotations on the target to inspect the
capabilities of the target.Modifier and Type | Method and Description |
---|---|
MessageHandlerInterceptorMemberChain<T> |
chainedInterceptor(Class<?> type)
Returns an Interceptor Chain of annotated interceptor methods defined on the given
type . |
Map<Class<?>,SortedSet<MessageHandlingMember<? super T>>> |
getAllHandlers()
Gets all handlers per type for inspected entity.
|
Set<Class<?>> |
getAllInspectedTypes()
Returns a
Set of all types which have been inspected for handlers. |
Map<Class<?>,SortedSet<MessageHandlingMember<? super T>>> |
getAllInterceptors()
Returns a Map of all registered interceptor methods per inspected type.
|
List<MessageHandlingMember<? super T>> |
getHandlers()
Deprecated.
use
getAllHandlers() or getHandlers(Class) instead |
Stream<MessageHandlingMember<? super T>> |
getHandlers(Class<?> type)
Returns a list of detected members of given
type that are capable of handling certain messages. |
<C> AnnotatedHandlerInspector<C> |
inspect(Class<? extends C> entityType)
Inspect another handler type and register the result to the inspector registry of this inspector.
|
static <T> AnnotatedHandlerInspector<T> |
inspectType(Class<? extends T> handlerType)
Create an inspector for given
handlerType that uses a ClasspathParameterResolverFactory to
resolve method parameters and ClasspathHandlerDefinition to create handlers. |
static <T> AnnotatedHandlerInspector<T> |
inspectType(Class<? extends T> handlerType,
ParameterResolverFactory parameterResolverFactory)
Create an inspector for given
handlerType that uses given parameterResolverFactory to resolve
method parameters. |
static <T> AnnotatedHandlerInspector<T> |
inspectType(Class<? extends T> handlerType,
ParameterResolverFactory parameterResolverFactory,
HandlerDefinition handlerDefinition)
Create an inspector for given
handlerType that uses given parameterResolverFactory to resolve
method parameters and given handlerDefinition to create handlers. |
static <T> AnnotatedHandlerInspector<T> |
inspectType(Class<? extends T> handlerType,
ParameterResolverFactory parameterResolverFactory,
HandlerDefinition handlerDefinition,
Set<Class<? extends T>> declaredSubtypes)
Create an inspector for given
handlerType and its declaredSubtypes that uses given parameterResolverFactory to resolve method parameters and given handlerDefinition to create handlers. |
public static <T> AnnotatedHandlerInspector<T> inspectType(Class<? extends T> handlerType)
handlerType
that uses a ClasspathParameterResolverFactory
to
resolve method parameters and ClasspathHandlerDefinition
to create handlers.T
- the handler's typehandlerType
- the target handler typepublic static <T> AnnotatedHandlerInspector<T> inspectType(Class<? extends T> handlerType, ParameterResolverFactory parameterResolverFactory)
handlerType
that uses given parameterResolverFactory
to resolve
method parameters.T
- the handler's typehandlerType
- the target handler typeparameterResolverFactory
- the resolver factory to use during detectionpublic static <T> AnnotatedHandlerInspector<T> inspectType(Class<? extends T> handlerType, ParameterResolverFactory parameterResolverFactory, HandlerDefinition handlerDefinition)
handlerType
that uses given parameterResolverFactory
to resolve
method parameters and given handlerDefinition
to create handlers.T
- the handler's typehandlerType
- the target handler typeparameterResolverFactory
- the resolver factory to use during detectionhandlerDefinition
- the handler definition used to create concrete handlerspublic static <T> AnnotatedHandlerInspector<T> inspectType(Class<? extends T> handlerType, ParameterResolverFactory parameterResolverFactory, HandlerDefinition handlerDefinition, Set<Class<? extends T>> declaredSubtypes)
handlerType
and its declaredSubtypes
that uses given parameterResolverFactory
to resolve method parameters and given handlerDefinition
to create handlers.T
- the handler's typehandlerType
- the target handler typeparameterResolverFactory
- the resolver factory to use during detectionhandlerDefinition
- the handler definition used to create concrete handlersdeclaredSubtypes
- the declared subtypes of this handlerType
public <C> AnnotatedHandlerInspector<C> inspect(Class<? extends C> entityType)
C
- the handler's typeentityType
- the type of the handler to inspect@Deprecated public List<MessageHandlingMember<? super T>> getHandlers()
getAllHandlers()
or getHandlers(Class)
insteadpublic Stream<MessageHandlingMember<? super T>> getHandlers(Class<?> type)
type
that are capable of handling certain messages.type
- a type of inspected entitytype
public MessageHandlerInterceptorMemberChain<T> chainedInterceptor(Class<?> type)
type
. The given chain will invoke all relevant interceptors in an order defined
by the handler definition.type
- The type containing the handler definitionspublic Map<Class<?>,SortedSet<MessageHandlingMember<? super T>>> getAllHandlers()
HandlerComparator
.public Map<Class<?>,SortedSet<MessageHandlingMember<? super T>>> getAllInterceptors()
Copyright © 2010–2024. All rights reserved.