@Test public void retrievesPathParameterFromRequest() throws Exception { when(typeProducer.createValue("foo", pathParameters, null)).thenReturn(pathParameters.getFirst("foo")); Object resolvedHeader = pathParameterResolver.resolve(parameter, applicationContext); assertEquals(pathParameters.getFirst("foo"), resolvedHeader); }
@Override public Object resolve(org.everrest.core.Parameter parameter, ApplicationContext context) throws Exception { String param = this.pathParam.value(); TypeProducer typeProducer = typeProducerFactory.createTypeProducer(parameter.getParameterClass(), parameter.getGenericType()); return typeProducer.createValue(param, context.getPathParameters(!parameter.isEncoded()), parameter.getDefaultValue()); }
PathParameterResolver implements ParameterResolver<PathParam> { @Override public Object resolve(org.everrest.core.Parameter parameter, ApplicationContext context) throws Exception { String param = this.pathParam.value(); TypeProducer typeProducer = typeProducerFactory.createTypeProducer(parameter.getParameterClass(), parameter.getGenericType()); return typeProducer.createValue(param, context.getPathParameters(!parameter.isEncoded()), parameter.getDefaultValue()); } }
PathParameterResolver implements ParameterResolver<PathParam> { @Override public Object resolve(org.everrest.core.Parameter parameter, ApplicationContext context) throws Exception { String param = this.pathParam.value(); TypeProducer typeProducer = typeProducerFactory.createTypeProducer(parameter.getParameterClass(), parameter.getGenericType()); return typeProducer.createValue(param, context.getPathParameters(!parameter.isEncoded()), parameter.getDefaultValue()); } PathParameterResolver(PathParam pathParam, TypeProducerFactory typeProducerFactory); }
PathParameterResolver implements ParameterResolver<PathParam> { @Override public Object resolve(org.everrest.core.Parameter parameter, ApplicationContext context) throws Exception { String param = this.pathParam.value(); TypeProducer typeProducer = typeProducerFactory.createTypeProducer(parameter.getParameterClass(), parameter.getGenericType()); return typeProducer.createValue(param, context.getPathParameters(!parameter.isEncoded()), parameter.getDefaultValue()); } PathParameterResolver(PathParam pathParam, TypeProducerFactory typeProducerFactory); @Override Object resolve(org.everrest.core.Parameter parameter, ApplicationContext context); }
PathParameterResolver implements ParameterResolver<PathParam> { @Override public Object resolve(org.everrest.core.Parameter parameter, ApplicationContext context) throws Exception { String param = this.pathParam.value(); TypeProducer typeProducer = typeProducerFactory.createTypeProducer(parameter.getParameterClass(), parameter.getGenericType()); return typeProducer.createValue(param, context.getPathParameters(!parameter.isEncoded()), parameter.getDefaultValue()); } PathParameterResolver(PathParam pathParam, TypeProducerFactory typeProducerFactory); @Override Object resolve(org.everrest.core.Parameter parameter, ApplicationContext context);  }