@Override public Class<?> getParameterType() { if (this.returnValue != null) { return this.returnValue.getClass(); } if (!ResolvableType.NONE.equals(this.returnType)) { return this.returnType.toClass(); } return super.getParameterType(); }
private MethodParameter[] initMethodParameters() { int count = this.bridgedMethod.getParameterCount(); MethodParameter[] result = new MethodParameter[count]; for (int i = 0; i < count; i++) { HandlerMethodParameter parameter = new HandlerMethodParameter(i); GenericTypeResolver.resolveParameterType(parameter, this.beanType); result[i] = parameter; } return result; }
anns = super.getParameterAnnotations(); for (Annotation[][] ifcAnns : getInterfaceParameterAnnotations()) { int index = getParameterIndex(); if (index < ifcAnns.length) { Annotation[] paramAnns = ifcAnns[index]; merged.add(adaptAnnotation(paramAnn));
/** * A MethodParameter with HandlerMethod-specific behavior. */ protected class HandlerMethodParameter extends SynthesizingMethodParameter { public HandlerMethodParameter(int index) { super(HandlerMethod.this.bridgedMethod, index); } protected HandlerMethodParameter(HandlerMethodParameter original) { super(original); } @Override public Class<?> getContainingClass() { return HandlerMethod.this.getBeanType(); } @Override public <T extends Annotation> T getMethodAnnotation(Class<T> annotationType) { return HandlerMethod.this.getMethodAnnotation(annotationType); } @Override public <T extends Annotation> boolean hasMethodAnnotation(Class<T> annotationType) { return HandlerMethod.this.hasMethodAnnotation(annotationType); } @Override public HandlerMethodParameter clone() { return new HandlerMethodParameter(this); } }
@Override public Annotation[] getParameterAnnotations() { Annotation[] anns = this.combinedAnnotations; if (anns == null) { anns = super.getParameterAnnotations(); for (Annotation[][] ifcAnns : getInterfaceParameterAnnotations()) { Annotation[] paramAnns = ifcAnns[getParameterIndex()]; if (paramAnns.length > 0) { List<Annotation> merged = new ArrayList<>(anns.length + paramAnns.length); merged.addAll(Arrays.asList(anns)); for (Annotation paramAnn : paramAnns) { boolean existingType = false; for (Annotation ann : anns) { if (ann.annotationType() == paramAnn.annotationType()) { existingType = true; break; } } if (!existingType) { merged.add(adaptAnnotation(paramAnn)); } } anns = merged.toArray(new Annotation[0]); } } this.combinedAnnotations = anns; } return anns; }
@Override public Class<?> getParameterType() { return (this.returnValue != null ? this.returnValue.getClass() : super.getParameterType()); }
public ConcurrentResultMethodParameter(ConcurrentResultMethodParameter original) { super(original); this.returnValue = original.returnValue; this.returnType = original.returnType; }
@Override public Class<?> getParameterType() { if (this.returnValue != null) { return this.returnValue.getClass(); } if (!ResolvableType.NONE.equals(this.returnType)) { return this.returnType.resolve(Object.class); } return super.getParameterType(); }
@Override public Class<?> getParameterType() { return (this.returnValue != null ? this.returnValue.getClass() : super.getParameterType()); }
private MethodParameter[] initMethodParameters() { int count = this.bridgedMethod.getParameterCount(); MethodParameter[] result = new MethodParameter[count]; for (int i = 0; i < count; i++) { HandlerMethodParameter parameter = new HandlerMethodParameter(i); GenericTypeResolver.resolveParameterType(parameter, this.beanType); result[i] = parameter; } return result; }
/** * Return the HandlerMethod return type. */ public MethodParameter getReturnType() { return new HandlerMethodParameter(-1); }
@Override public HandlerMethodParameter clone() { return new HandlerMethodParameter(this); } }
public ConcurrentResultMethodParameter(Object returnValue) { super(-1); this.returnValue = returnValue; this.returnType = (returnValue instanceof ReactiveTypeHandler.CollectedValuesList ? ((ReactiveTypeHandler.CollectedValuesList) returnValue).getReturnType() : ResolvableType.forType(super.getGenericParameterType()).getGeneric()); }
@Override public <T extends Annotation> boolean hasMethodAnnotation(Class<T> annotationType) { // Ensure @ResponseBody-style handling for values collected from a reactive type // even if actual return type is ResponseEntity<Flux<T>> return (super.hasMethodAnnotation(annotationType) || (annotationType == ResponseBody.class && this.returnValue instanceof ReactiveTypeHandler.CollectedValuesList)); }
@Override public Class<?> getParameterType() { return (this.returnValue != null ? this.returnValue.getClass() : super.getParameterType()); }
@Override public HandlerMethodParameter clone() { return new HandlerMethodParameter(this); } }
if (anns == null) { anns = super.getParameterAnnotations(); int index = getParameterIndex(); if (index >= 0) { for (Annotation[][] ifcAnns : getInterfaceParameterAnnotations()) { merged.add(adaptAnnotation(paramAnn));
/** * Return the HandlerMethod return type. */ public MethodParameter getReturnType() { return new HandlerMethodParameter(-1); }
@Override public Class<?> getParameterType() { return (this.returnValue != null ? this.returnValue.getClass() : super.getParameterType()); }
private MethodParameter[] initMethodParameters() { int count = this.bridgedMethod.getParameterCount(); MethodParameter[] result = new MethodParameter[count]; for (int i = 0; i < count; i++) { HandlerMethodParameter parameter = new HandlerMethodParameter(i); GenericTypeResolver.resolveParameterType(parameter, this.beanType); result[i] = parameter; } return result; }