Class EventContextArgumentResolver
java.lang.Object
com.sap.cds.services.impl.handlerregistry.resolver.EventContextArgumentResolver
- All Implemented Interfaces:
ArgumentResolver
Handles all types of
EventContext based arguments in handler methods-
Method Summary
Modifier and TypeMethodDescriptionstatic EventContextArgumentResolvercreateIfApplicable(Class<?> type) Returns aEventContextArgumentResolver, if the given type is anEventContextString[]resolve(EventContext context) Finds an argument value on the givenEventContextvoidverifyOrThrow(HandlerDescriptor descriptor) Does basic checks if the EventContext parameter of the given MethodHandle matches the registered event(s).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sap.cds.services.impl.handlerregistry.resolver.ArgumentResolver
indicateEntities
-
Method Details
-
createIfApplicable
Returns aEventContextArgumentResolver, if the given type is anEventContext- Parameters:
type- the type- Returns:
- a
EventContextArgumentResolver, if the given type is anEventContext
-
resolve
Description copied from interface:ArgumentResolverFinds an argument value on the givenEventContext- Specified by:
resolvein interfaceArgumentResolver- Parameters:
context- theEventContextcurrently processed- Returns:
- the determined argument value
-
verifyOrThrow
Does basic checks if the EventContext parameter of the given MethodHandle matches the registered event(s). A specifiedEventContextparameter must have aEventNameannotation which matches exactly the event of the Handler annotations.- Specified by:
verifyOrThrowin interfaceArgumentResolver- Parameters:
descriptor- The descriptor to be checked
-
indicateEvents
- Specified by:
indicateEventsin interfaceArgumentResolver- Returns:
- an array of indicated events, that can be used if the handler does not specify events in their annotation
-