Example usage for org.springframework.messaging.handler.invocation InvocableHandlerMethod getMethodAnnotation

List of usage examples for org.springframework.messaging.handler.invocation InvocableHandlerMethod getMethodAnnotation

Introduction

In this page you can find the example usage for org.springframework.messaging.handler.invocation InvocableHandlerMethod getMethodAnnotation.

Prototype

@Nullable
public <A extends Annotation> A getMethodAnnotation(Class<A> annotationType) 

Source Link

Document

Return a single annotation on the underlying method traversing its super methods if no annotation can be found on the given method itself.

Usage

From source file:com.kinglcc.spring.jms.core.listener.MethodJmsFilterListenerAdapter.java

public void setHandlerMethod(InvocableHandlerMethod handlerMethod) {
    super.setHandlerMethod(handlerMethod);
    JmsFilter jmsFilter = handlerMethod.getMethodAnnotation(JmsFilter.class);
    if (null != jmsFilter) {
        for (String fn : jmsFilter.value()) {
            filters.add(resolveMessageFilter(fn));
        }/*from  w w  w.  ja va2 s .co m*/
    }
}