Examples of MethodParameters


Examples of jadx.core.dex.attributes.annotations.MethodParameters

    for (int i = 0; i < annotatedParametersCount; i++) {
      MethodNode mth = cls.searchMethodById(section.readInt());
      // read annotation ref list
      Section ss = dex.openSection(section.readInt());
      int size = ss.readInt();
      MethodParameters params = new MethodParameters(size);
      for (int j = 0; j < size; j++) {
        params.getParamList().add(readAnnotationSet(ss.readInt()));
      }
      mth.addAttr(params);
    }
  }
View Full Code Here

Examples of jadx.core.dex.attributes.annotations.MethodParameters

    code.attachDefinition(mth);
    return true;
  }

  private void addMethodArguments(CodeWriter argsCode, List<RegisterArg> args) {
    MethodParameters paramsAnnotation = mth.get(AType.ANNOTATION_MTH_PARAMETERS);
    int i = 0;
    for (Iterator<RegisterArg> it = args.iterator(); it.hasNext(); ) {
      RegisterArg arg = it.next();

      // add argument annotation
View Full Code Here

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

Examples of org.springframework.hateoas.core.MethodParameters

    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

Examples of org.springframework.hateoas.core.MethodParameters

  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

Examples of org.springframework.hateoas.core.MethodParameters

    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

Examples of org.springframework.hateoas.core.MethodParameters

   */
  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

Examples of org.springframework.hateoas.core.MethodParameters

   * @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
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.