}
ActionMapping actionMapping = AnnotationUtils.findAnnotation(method, ActionMapping.class);
RenderMapping renderMapping = AnnotationUtils.findAnnotation(method, RenderMapping.class);
ResourceMapping resourceMapping = AnnotationUtils.findAnnotation(method, ResourceMapping.class);
EventMapping eventMapping = AnnotationUtils.findAnnotation(method, EventMapping.class);
RequestMapping requestMapping = AnnotationUtils.findAnnotation(method, RequestMapping.class);
if (actionMapping != null) {
params = StringUtils.mergeStringArrays(params, actionMapping.params());
predicate = new ActionMappingPredicate(actionMapping.value(), params);
}
else if (renderMapping != null) {
params = StringUtils.mergeStringArrays(params, renderMapping.params());
predicate = new RenderMappingPredicate(renderMapping.value(), params);
}
else if (resourceMapping != null) {
predicate = new ResourceMappingPredicate(resourceMapping.value());
}
else if (eventMapping != null) {
predicate = new EventMappingPredicate(eventMapping.value());
}
if (requestMapping != null) {
modeKeys = requestMapping.value();
if (typeMapping != null) {
if (!PortletAnnotationMappingUtils.validateModeMapping(modeKeys, typeMapping.value())) {
throw new IllegalStateException("Mode mappings conflict between method and type level: " +
Arrays.asList(modeKeys) + " versus " + Arrays.asList(typeMapping.value()));
}
}
params = StringUtils.mergeStringArrays(params, requestMapping.params());
if (predicate == null) {
predicate = new MethodLevelMappingPredicate(params);
}
}
if (predicate != null) {