List of usage examples for org.springframework.core.type MethodMetadata isAnnotated
default boolean isAnnotated(String annotationName)
From source file:org.joinfaces.annotations.JsfCdiToSpring.java
static String deduceScopeName(MethodMetadata methodMetadata) { String result = null;/*from ww w . ja v a2 s.co m*/ if (methodMetadata != null) { if (methodMetadata.isAnnotated(javax.enterprise.context.RequestScoped.class.getName()) || methodMetadata.isAnnotated(javax.faces.bean.RequestScoped.class.getName())) { result = REQUEST; } else if (methodMetadata.isAnnotated(javax.enterprise.context.SessionScoped.class.getName()) || methodMetadata.isAnnotated(javax.faces.bean.SessionScoped.class.getName())) { result = SESSION; } else if (methodMetadata.isAnnotated(javax.enterprise.context.ApplicationScoped.class.getName()) || methodMetadata.isAnnotated(javax.faces.bean.ApplicationScoped.class.getName())) { result = SINGLETON; } else if (methodMetadata.isAnnotated(javax.faces.bean.NoneScoped.class.getName())) { result = PROTOTYPE; } else if (methodMetadata.isAnnotated(javax.faces.view.ViewScoped.class.getName()) || methodMetadata.isAnnotated(javax.faces.bean.ViewScoped.class.getName())) { result = VIEW; } else if (methodMetadata.isAnnotated(javax.enterprise.context.ConversationScoped.class.getName())) { result = SESSION; } } return result; }