@Override public String getValueOf(PathParam a) { return a.value(); }
@Override public String getValueOf(PathParam a) { return a.value(); }
@Override public String getValueOf(PathParam a) { return a.value(); }
/** * Derives member's name and type from it's annotations */ public static Optional<String> getParameterNameFromAnnotations(Annotation[] memberAnnotations) { for (Annotation a : memberAnnotations) { if (a instanceof QueryParam) { return Optional.of("query param " + ((QueryParam) a).value()); } else if (a instanceof PathParam) { return Optional.of("path param " + ((PathParam) a).value()); } else if (a instanceof HeaderParam) { return Optional.of("header " + ((HeaderParam) a).value()); } else if (a instanceof CookieParam) { return Optional.of("cookie " + ((CookieParam) a).value()); } else if (a instanceof FormParam) { return Optional.of("form field " + ((FormParam) a).value()); } else if (a instanceof Context) { return Optional.of("context"); } else if (a instanceof MatrixParam) { return Optional.of("matrix param " + ((MatrixParam) a).value()); } } return Optional.empty(); }
newTarget = newTarget.resolveTemplate(((PathParam) ann).value(), value); } else if ((ann = anns.get((QueryParam.class))) != null) { if (value instanceof Collection) {
@Override public String getAnnotationParameterName(Object annotation) { return ((PathParam) annotation).value(); } }
@Override public String getValueOf(PathParam a) { return a.value(); }
Parameter pp = new Parameter(); pp.setIn(PATH_PARAM); pp.setName(param.value()); parameter = pp; } else if (annotation instanceof MatrixParam) {
@Override public Object invoke(Object[] args) { WebTarget target = parent; if (hasJaxParams) { HashMap<String, Object> pathParams = new HashMap<String, Object>(); for (int i = 0; i < jaxParams.length; i++) { if (jaxParams[i] instanceof PathParam) { pathParams.put(((PathParam) jaxParams[i]).value(), args[i]); } else if (jaxParams[i] instanceof MatrixParam) { target = target.matrixParam(((MatrixParam) jaxParams[i]).value(), args[i]); } } if (!pathParams.isEmpty()) { target = target.resolveTemplates(pathParams); } } return ProxyBuilder.proxy(iface, target, config); } }
org.jboss.resteasy.annotations.jaxrs.PathParam pathParam2 = p.getAnnotation(org.jboss.resteasy.annotations.jaxrs.PathParam.class); if (pathParam != null) { paramMap.put(pathParam.value(), "foobar"); } else if (pathParam2 != null) { paramMap.put((pathParam2.value() != null && pathParam2.value().length() > 0) ?
return ((PathParam) annotation).value();
private PathParameter extractPathParam(Type type, String defaultValue, PathParam param) { PathParameter pathParameter = new PathParameter().name(param.value()); if (!Strings.isNullOrEmpty(defaultValue)) { pathParameter.setDefaultValue(defaultValue); } Property schema = ModelConverters.getInstance().readAsProperty(type); if (schema != null) { pathParameter.setProperty(schema); } String parameterType = pathParameter.getType(); if (parameterType == null || parameterType.equals("ref")) { pathParameter.setType("string"); } return pathParameter; }
private String pathExpression(String pathExpression, JParameter arg, PathParam paramPath) throws UnableToCompleteException { String expr = toStringExpression(arg); return pathExpression.replaceAll(Pattern.quote("{" + paramPath.value()) + "(\\s*:\\s*([^{}][^{}]*))*\\}", "\"+(" + expr + "== null? null : com.google.gwt.http.client.URL.encodePathSegment(" + expr + "))+\""); }
parameter.paramName = uriParam.value();
private Multimap<String, Object> getPathParamKeyValues(Invocation invocation) { Multimap<String, Object> pathParamValues = LinkedHashMultimap.create(); for (Parameter param : parametersWithAnnotation(invocation.getInvokable(), PathParam.class)) { PathParam pathParam = param.getAnnotation(PathParam.class); String paramKey = pathParam.value(); Optional<?> paramValue = getParamValue(invocation, param.getAnnotation(ParamParser.class), param.hashCode(), paramKey); if (paramValue.isPresent()) pathParamValues.put(paramKey, paramValue.get().toString()); } return pathParamValues; }
private Multimap<String, Object> getPathParamKeyValues(Invocation invocation) { Multimap<String, Object> pathParamValues = LinkedHashMultimap.create(); for (Parameter param : parametersWithAnnotation(invocation.getInvokable(), PathParam.class)) { PathParam pathParam = param.getAnnotation(PathParam.class); String paramKey = pathParam.value(); Optional<?> paramValue = getParamValue(invocation, param.getAnnotation(ParamParser.class), param.hashCode(), paramKey); if (paramValue.isPresent()) pathParamValues.put(paramKey, paramValue.get().toString()); } return pathParamValues; }
uriParam.value()); } else if ((matrix = FindAnnotation.findAnnotation(annotations, MatrixParam.class)) != null)
PathParam.class)) != null) { addParameter(type, annotations, ResteasyWadlMethodParamMetaData.MethodParamType.PATH_PARAMETER, pathParam.value()); } else if ((matrixParam = FindAnnotation.findAnnotation(annotations, MatrixParam.class)) != null) {
return new PathParamInjector(type, genericType, injectTarget, uriParam.value(), defaultVal, encode, annotations, providerFactory);
PathParam.class)) != null) processor = new PathParamProcessor(uriParam.value(), isEncoded, genericType, annotations, configuration);