Examples of PathVariable


Examples of com.apitrary.api.annotation.PathVariable

    String unresolvedPath = ClassUtil.getClassAnnotationValue(clazz, Path.class, "value", String.class);

    Map<String, String> patternMap = new HashMap<String, String>();
    for (Field field : clazz.getDeclaredFields()) {
      PathVariable part = field.getAnnotation(PathVariable.class);
      if (part != null) {
        try {
          String pattern = part.value();
          field.setAccessible(true);
          String value = (String) field.get(request);
          patternMap.put(pattern, value);
        } catch (Exception e) {
          throw new RuntimeException(e);
View Full Code Here

Examples of com.apitrary.api.annotation.PathVariable

    String unresolvedPath = ClassUtil.getClassAnnotationValue(clazz, Path.class, "value", String.class);

    Map<String, String> patternMap = new HashMap<String, String>();
    for (Field field : clazz.getDeclaredFields()) {
      PathVariable part = field.getAnnotation(PathVariable.class);
      if (part != null) {
        try {
          String pattern = part.value();
          field.setAccessible(true);
          String value = (String) field.get(request);
          patternMap.put(pattern, value);
        } catch (Exception e) {
          throw new RuntimeException(e);
View Full Code Here

Examples of com.cloudcontrolled.api.annotation.PathVariable

    String unresolvedPath = ClassUtil.getClassAnnotationValue(clazz, Path.class, "value", String.class);

    Map<String, String> patternMap = new HashMap<String, String>();
    for (Field field : clazz.getDeclaredFields()) {
      PathVariable part = field.getAnnotation(PathVariable.class);
      if (part != null) {
        try {
          String pattern = part.value();
          field.setAccessible(true);
          String value = (String) field.get(request);
          patternMap.put(pattern, value);
        } catch (Exception e) {
          throw new RuntimeException(e);
View Full Code Here

Examples of org.springframework.web.bind.annotation.PathVariable

* @see PathVariableMethodArgumentResolver
*/
public class PathVariableMapMethodArgumentResolver implements HandlerMethodArgumentResolver {

  public boolean supportsParameter(MethodParameter parameter) {
    PathVariable annot = parameter.getParameterAnnotation(PathVariable.class);
    return ((annot != null) && (Map.class.isAssignableFrom(parameter.getParameterType()))
        && (!StringUtils.hasText(annot.value())));
  }
View Full Code Here

Examples of org.springframework.web.bind.annotation.PathVariable

          required = cookieValue.required();
          defaultValue = parseDefaultValueAttribute(cookieValue.defaultValue());
          annotationsFound++;
        }
        else if (PathVariable.class.isInstance(paramAnn)) {
          PathVariable pathVar = (PathVariable) paramAnn;
          pathVarName = pathVar.value();
          annotationsFound++;
        }
        else if (ModelAttribute.class.isInstance(paramAnn)) {
          ModelAttribute attr = (ModelAttribute) paramAnn;
          attrName = attr.value();
View Full Code Here

Examples of org.springframework.web.bind.annotation.PathVariable

        else if (ModelAttribute.class.isInstance(paramAnn)) {
          throw new IllegalStateException(
              "@ModelAttribute is not supported on @InitBinder methods: " + initBinderMethod);
        }
        else if (PathVariable.class.isInstance(paramAnn)) {
          PathVariable pathVar = (PathVariable) paramAnn;
          pathVarName = pathVar.value();
        }
      }

      if (paramName == null && pathVarName == null) {
        Object argValue = resolveCommonArgument(methodParam, webRequest);
View Full Code Here

Examples of org.springframework.web.bind.annotation.PathVariable

    return parameter.hasParameterAnnotation(PathVariable.class);
  }

  @Override
  protected NamedValueInfo createNamedValueInfo(MethodParameter parameter) {
    PathVariable annotation = parameter.getParameterAnnotation(PathVariable.class);
    return new PathVariableNamedValueInfo(annotation);
  }
View Full Code Here

Examples of org.springframework.web.bind.annotation.PathVariable

    return true;
  }

  @Override
  protected NamedValueInfo createNamedValueInfo(MethodParameter parameter) {
    PathVariable annotation = parameter.getParameterAnnotation(PathVariable.class);
    return new PathVariableNamedValueInfo(annotation);
  }
View Full Code Here

Examples of org.springframework.web.bind.annotation.PathVariable

*/
public class PathVariableMapMethodArgumentResolver implements HandlerMethodArgumentResolver {

  @Override
  public boolean supportsParameter(MethodParameter parameter) {
    PathVariable ann = parameter.getParameterAnnotation(PathVariable.class);
    return (ann != null && (Map.class.isAssignableFrom(parameter.getParameterType()))
        && !StringUtils.hasText(ann.value()));
  }
View Full Code Here

Examples of org.springframework.web.bind.annotation.PathVariable

    return true;
  }

  @Override
  protected NamedValueInfo createNamedValueInfo(MethodParameter parameter) {
    PathVariable annotation = parameter.getParameterAnnotation(PathVariable.class);
    return new PathVariableNamedValueInfo(annotation);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.