Package org.springframework.hateoas.core

Examples of org.springframework.hateoas.core.MethodParameters


   * @param parameter must not be {@literal null}.
   * @return
   */
  private static final MethodParameter findMatchingPageableParameter(MethodParameter parameter) {

    MethodParameters parameters = new MethodParameters(parameter.getMethod());
    List<MethodParameter> pageableParameters = parameters.getParametersOfType(Pageable.class);
    Qualifier assemblerQualifier = parameter.getParameterAnnotation(Qualifier.class);

    if (pageableParameters.isEmpty()) {
      return null;
    }
View Full Code Here


    return invoke(method, prepareParameters(method, parameters, pageable, sort));
  }

  private Object[] prepareParameters(Method method, Map<String, String[]> rawParameters, Pageable pageable, Sort sort) {

    List<MethodParameter> parameters = new MethodParameters(method, PARAM_ANNOTATION).getParameters();

    if (parameters.isEmpty()) {
      return new Object[0];
    }
View Full Code Here

  private static final List<ParameterMetadata> discoverParameterMetadata(Method method, String baseRel) {

    List<ParameterMetadata> result = new ArrayList<ParameterMetadata>();

    for (MethodParameter parameter : new MethodParameters(method, PARAM_VALUE).getParameters()) {
      if (StringUtils.hasText(parameter.getParameterName())) {
        result.add(new ParameterMetadata(parameter, baseRel));
      }
    }
View Full Code Here

    return invoke(method, prepareParameters(method, parameters, pageable, sort));
  }

  private Object[] prepareParameters(Method method, Map<String, String[]> rawParameters, Pageable pageable, Sort sort) {

    List<MethodParameter> parameters = new MethodParameters(method, PARAM_ANNOTATION).getParameters();

    if (parameters.isEmpty()) {
      return new Object[0];
    }
View Full Code Here

   */
  public List<BoundMethodParameter> getBoundParameters(MethodInvocation invocation) {

    Assert.notNull(invocation, "MethodInvocation must not be null!");

    MethodParameters parameters = new MethodParameters(invocation.getMethod());
    Object[] arguments = invocation.getArguments();
    List<BoundMethodParameter> result = new ArrayList<BoundMethodParameter>();

    for (MethodParameter parameter : parameters.getParametersWith(attribute.getAnnotationType())) {

      Object value = arguments[parameter.getParameterIndex()];
      Object verifiedValue = verifyParameterValue(parameter, value);

      if (verifiedValue != null) {
View Full Code Here

   * @param invocation will never be {@literal null}.
   * @return
   */
  protected UriComponentsBuilder applyUriComponentsContributer(UriComponentsBuilder builder, MethodInvocation invocation) {

    MethodParameters parameters = new MethodParameters(invocation.getMethod());
    Iterator<Object> parameterValues = Arrays.asList(invocation.getArguments()).iterator();

    for (MethodParameter parameter : parameters.getParameters()) {
      Object parameterValue = parameterValues.next();
      for (UriComponentsContributor contributor : uriComponentsContributors) {
        if (contributor.supportsParameter(parameter)) {
          contributor.enhance(builder, parameter, parameterValue);
        }
View Full Code Here

TOP

Related Classes of org.springframework.hateoas.core.MethodParameters

Copyright © 2018 www.massapicom. 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.