Example usage for org.springframework.core.annotation AnnotationUtils getValue

List of usage examples for org.springframework.core.annotation AnnotationUtils getValue

Introduction

In this page you can find the example usage for org.springframework.core.annotation AnnotationUtils getValue.

Prototype

@Nullable
public static Object getValue(@Nullable Annotation annotation, @Nullable String attributeName) 

Source Link

Document

Retrieve the value of a named attribute, given an annotation instance.

Usage

From source file:org.springframework.statemachine.processor.StateMachineHandlerCallHelper.java

public void callOnTransitionEnd(String stateMachineId, StateContext<S, E> stateContext) {
    List<StateMachineHandler<? extends Annotation, S, E>> handlersList = new ArrayList<StateMachineHandler<? extends Annotation, S, E>>();
    String cacheKey = OnTransitionEnd.class.getName() + stateMachineId;
    List<CacheEntry> list = getCacheEntries(cacheKey);
    if (list == null) {
        return;//from ww w. jav  a 2  s  .co m
    }
    for (CacheEntry entry : list) {
        if (annotationHandlerSourceTargetMatch(
                (String[]) AnnotationUtils.getValue(entry.metaAnnotation, "source"),
                (String[]) AnnotationUtils.getValue(entry.metaAnnotation, "target"), entry.annotation,
                stateContext.getTransition().getSource(), stateContext.getTransition().getTarget())) {
            handlersList.add(entry.handler);
        }
    }
    getStateMachineHandlerResults(handlersList, stateContext);
}