public DefaultResourceLocator(final ResourceClass resourceClass, final Method method, final Method annotatedMethod) { this.resourceClass = resourceClass; this.annotatedMethod = annotatedMethod; this.method = method; // we initialize generic types based on the method of the resource class rather than the Method that is actually // annotated. This is so we have the appropriate generic type information. this.genericReturnType = Types.resolveTypeVariables(resourceClass.getClazz(), method.getGenericReturnType()); this.returnType = Types.getRawType(genericReturnType); this.params = new MethodParameter[method.getParameterTypes().length]; Parameter[] reflectionParameters = method.getParameters(); for (int i = 0; i < method.getParameterTypes().length; i++) { this.params[i] = new MethodParameter(this, reflectionParameters[i].getName(), method.getParameterTypes()[i], method.getGenericParameterTypes()[i], annotatedMethod.getParameterAnnotations()[i]); } }
if (Parameter.ParamType.CONTEXT.equals(resourceMethodParameter.getParamType()) && SseEventSink.class.equals(resourceMethodParameter.getType()))
if (Parameter.ParamType.CONTEXT.equals(resourceMethodParameter.getParamType()) && SseEventSink.class.equals(resourceMethodParameter.getType()))
public DefaultResourceLocator(final ResourceClass resourceClass, final Method method, final Method annotatedMethod) { this.resourceClass = resourceClass; this.annotatedMethod = annotatedMethod; this.method = method; // we initialize generic types based on the method of the resource class rather than the Method that is actually // annotated. This is so we have the appropriate generic type information. this.genericReturnType = Types.resolveTypeVariables(resourceClass.getClazz(), method.getGenericReturnType()); this.returnType = Types.getRawType(genericReturnType); this.params = new MethodParameter[method.getParameterTypes().length]; Parameter[] reflectionParameters = method.getParameters(); for (int i = 0; i < method.getParameterTypes().length; i++) { this.params[i] = new MethodParameter(this, reflectionParameters[i].getName(), method.getParameterTypes()[i], method.getGenericParameterTypes()[i], annotatedMethod.getParameterAnnotations()[i]); } }
if (Parameter.ParamType.CONTEXT.equals(resourceMethodParameter.getParamType()) && ResteasyProviderFactory.EE8_PREVIEW_MODE && SseEventSink.class.equals(resourceMethodParameter.getType()))
public ResourceLocator(ResourceClass resourceClass, Method method, Method annotatedMethod) { this.resourceClass = resourceClass; this.annotatedMethod = annotatedMethod; this.method = method; // we initialize generic types based on the method of the resource class rather than the Method that is actually // annotated. This is so we have the appropriate generic type information. this.genericReturnType = Types.resolveTypeVariables(resourceClass.getClazz(), method.getGenericReturnType()); this.returnType = Types.getRawType(genericReturnType); this.params = new MethodParameter[method.getParameterTypes().length]; for (int i = 0; i < method.getParameterTypes().length; i++) { this.params[i] = new MethodParameter(this, method.getParameterTypes()[i], method.getGenericParameterTypes()[i], annotatedMethod.getParameterAnnotations()[i]); } }