Java 类org.springframework.data.repository.query.ParametersParameterAccessor 实例源码

项目:spring-data-ebean    文件:AbstractEbeanQueryExecution.java   
@Override
@SuppressWarnings("unchecked")
protected Object doExecute(final AbstractEbeanQuery repositoryQuery, final Object[] values) {
  ParameterAccessor accessor = new ParametersParameterAccessor(parameters, values);
  Object createQuery = repositoryQuery.createQuery(values);

  if (createQuery instanceof Query) {
    Query ormQuery = (Query) createQuery;
    PagedList pagedList = ormQuery.findPagedList();
    return PageableExecutionUtils.getPage(pagedList.getList(), accessor.getPageable(), () -> pagedList.getTotalCount());
  } else if (createQuery instanceof SqlQuery) {
    SqlQuery sqlQuery = (SqlQuery) createQuery;
    // TODO page
    return sqlQuery.findList();
  } else {
    throw new InvalidEbeanQueryMethodException("query must be Query or SqlQuery");
  }
}
项目:spring-data-jpa-extra    文件:FreemarkerTemplateQuery.java   
@Override
protected Query doCreateQuery(Object[] values) {
    String nativeQuery = getQuery(values);
    JpaParameters parameters = getQueryMethod().getParameters();
    ParameterAccessor accessor = new ParametersParameterAccessor(parameters, values);
    String sortedQueryString = QueryUtils
            .applySorting(nativeQuery, accessor.getSort(), QueryUtils.detectAlias(nativeQuery));
    Query query = bind(createJpaQuery(sortedQueryString), values);
    if (parameters.hasPageableParameter()) {
        Pageable pageable = (Pageable) (values[parameters.getPageableIndex()]);
        if (pageable != null) {
            query.setFirstResult(pageable.getOffset());
            query.setMaxResults(pageable.getPageSize());
        }
    }
    return query;
}
项目:spring-data-keyvalue    文件:SpelQueryCreatorUnitTests.java   
private KeyValueQuery<SpelExpression> createQueryForMethodWithArgs(String methodName, Object... args)
        throws NoSuchMethodException, SecurityException {

    Class<?>[] argTypes = new Class<?>[args.length];
    if (!ObjectUtils.isEmpty(args)) {

        for (int i = 0; i < args.length; i++) {
            argTypes[i] = args[i].getClass();
        }
    }

    Method method = PersonRepository.class.getMethod(methodName, argTypes);
    doReturn(Person.class).when(metadataMock).getReturnedDomainClass(method);

    PartTree partTree = new PartTree(method.getName(), method.getReturnType());
    SpelQueryCreator creator = new SpelQueryCreator(partTree, new ParametersParameterAccessor(
            new QueryMethod(method, metadataMock, new SpelAwareProxyProjectionFactory()).getParameters(), args));

    KeyValueQuery<SpelExpression> q = creator.createQuery();
    q.getCriteria().setEvaluationContext(new StandardEvaluationContext(args));

    return q;
}
项目:spring-data-keyvalue    文件:SpelQueryEngineUnitTests.java   
private static SpelCriteria createQueryForMethodWithArgs(String methodName, Object... args) throws Exception {

        List<Class<?>> types = new ArrayList<>(args.length);

        for (Object arg : args) {
            types.add(arg.getClass());
        }

        Method method = PersonRepository.class.getMethod(methodName, types.toArray(new Class<?>[types.size()]));
        RepositoryMetadata metadata = mock(RepositoryMetadata.class);
        doReturn(method.getReturnType()).when(metadata).getReturnedDomainClass(method);

        PartTree partTree = new PartTree(method.getName(), method.getReturnType());
        SpelQueryCreator creator = new SpelQueryCreator(partTree, new ParametersParameterAccessor(
                new QueryMethod(method, metadata, new SpelAwareProxyProjectionFactory()).getParameters(), args));

        return new SpelCriteria(creator.createQuery().getCriteria(), new StandardEvaluationContext(args));
    }
项目:spring-data-tarantool    文件:TarantoolQueryCreatorTest.java   
private TarantoolQueryCreator createQueryCreatorForMethodWithArgs(Method method, Object[] args) {

        PartTree partTree = new PartTree(method.getName(), method.getReturnType());
        TarantoolQueryCreator creator = new TarantoolQueryCreator(partTree, new ParametersParameterAccessor(new DefaultParameters(
                method), args));

        return creator;
    }
项目:spring-data-snowdrop    文件:SnowdropPartQuery.java   
protected BaseQuery<?> createQuery(ParametersParameterAccessor accessor) {
    Class<?> entityClass = getQueryMethod().getEntityInformation().getJavaType();
    CriteriaQuery<?> query = new SnowdropQueryCreator(entityClass, tree, accessor, mappingContext).createQuery();

    query.setTargetFields(TargetFieldsUtils.getTargetFieldsMap(getQueryMethod()));

    query.setMaxResults(tree.getMaxResults());
    query.setDistinct(tree.isDistinct());

    return query;
}
项目:spring-data-snowdrop    文件:SnowdropStringQuery.java   
private String replacePlaceholders(String input, ParametersParameterAccessor accessor) {
  Matcher matcher = PARAMETER_PLACEHOLDER.matcher(input);
  String result = input;
  while (matcher.find()) {
    String group = matcher.group();
    int index = Integer.parseInt(matcher.group(1));
    result = result.replace(group, getParameterWithIndex(accessor, index));
  }
  return result;
}
项目:spring-data-snowdrop    文件:SnowdropStringQuery.java   
private String getParameterWithIndex(ParametersParameterAccessor accessor, int index) {
  Object parameter = accessor.getBindableValue(index);
  if (parameter == null) {
    return "null";
  }
  if (conversionService.canConvert(parameter.getClass(), String.class)) {
    return conversionService.convert(parameter, String.class);
  }
  return parameter.toString();
}
项目:spring-data-snowdrop    文件:AbstractSnowdropRepositoryQuery.java   
protected Class<?> getProjection(ParametersParameterAccessor accessor) {
    Optional<Class<?>> dp = accessor.getDynamicProjection();
    if (dp.isPresent()) {
        return dp.get();
    }
    Class<?> returnType = getQueryMethod().getReturnedObjectType();
    if (returnType.isInterface()) {
        return returnType;
    }
    // TODO - handle DTO
    return null;
}
项目:spring-data-snowdrop    文件:AbstractSnowdropRepositoryQuery.java   
@Override
public Object execute(Object[] parameters) {
    ParametersParameterAccessor accessor = new ParametersParameterAccessor(getQueryMethod().getParameters(), parameters);
    ResultProcessor resultProcessor = getQueryMethod().getResultProcessor().withDynamicProjection(accessor);
    Object source = executeInternal(accessor);
    return resultProcessor.processResult(source);
}
项目:spring-data-gclouddatastore    文件:GcloudDatastoreQueryCreatorTests.java   
private GcloudDatastoreQueryCreator createCreator(Class<?> repositoryClass,
        Method method, Object... values) {

    QueryMethod queryMethod = new QueryMethod(method,
            new DefaultRepositoryMetadata(repositoryClass),
            new SpelAwareProxyProjectionFactory());
    return new GcloudDatastoreQueryCreator(
            new PartTree(method.getName(),
                    queryMethod.getResultProcessor().getReturnedType()
                            .getDomainType()),
            new ParametersParameterAccessor(queryMethod.getParameters(), values),
            DatastoreOptions.getDefaultInstance());
}
项目:spring-data-objectify    文件:ObjectifyRepositoryQuery.java   
@Override
public Object execute(Object[] parameters) {
    ParameterAccessor accessor = new ParametersParameterAccessor(getQueryMethod().getParameters(), parameters);
    ResultProcessor processor = queryMethod.getResultProcessor().withDynamicProjection(accessor);

    return processor.processResult(doExecute(parameters));
}
项目:spring-data-ebean    文件:AbstractStringBasedEbeanQuery.java   
@Override
public Object doCreateQuery(Object[] values) {
  ParameterAccessor accessor = new ParametersParameterAccessor(getQueryMethod().getParameters(), values);
  Object query = createEbeanQuery(this.query.getQueryString());

  return createBinder(values).bindAndPrepare(query);
}
项目:spring-data-ebean    文件:PartTreeEbeanQuery.java   
protected EbeanQueryCreator createCreator(ParametersParameterAccessor accessor) {
  EbeanServer ebeanServer = getEbeanServer();
  Query ebeanQuery = ebeanServer.createQuery(domainClass);
  ExpressionList expressionList = ebeanQuery.where();

  ParameterMetadataProvider provider = new ParameterMetadataProvider(accessor);

  ResultProcessor processor = getQueryMethod().getResultProcessor();

  return new EbeanQueryCreator(tree, processor.getReturnedType(), expressionList, provider);
}
项目:spring-data-ebean    文件:AbstractEbeanQueryExecution.java   
@Override
@SuppressWarnings("unchecked")
protected Object doExecute(AbstractEbeanQuery query, Object[] values) {

  ParametersParameterAccessor accessor = new ParametersParameterAccessor(parameters, values);
  Pageable pageable = accessor.getPageable();

  Object createQuery = query.createQuery(values);
  List<Object> resultList = null;
  int pageSize = pageable.getPageSize();
  if (createQuery instanceof Query) {
    Query ormQuery = (Query) createQuery;
    ormQuery.setMaxRows(pageSize + 1);

    ormQuery.findList();
  } else if (createQuery instanceof SqlQuery) {
    SqlQuery sqlQuery = (SqlQuery) createQuery;

    sqlQuery.setMaxRows(pageSize + 1);

    sqlQuery.findList();
  } else {
    throw new InvalidEbeanQueryMethodException("query must be Query or SqlQuery");
  }

  boolean hasNext = resultList != null && resultList.size() > pageSize;

  return new SliceImpl<Object>(hasNext ? resultList.subList(0, pageSize) : resultList, pageable, hasNext);
}
项目:spring-data-ebean    文件:ParameterBinder.java   
/**
 * Creates a new {@link ParameterBinder}.
 *
 * @param parameters must not be {@literal null}.
 * @param values     must not be {@literal null}.
 */
public ParameterBinder(DefaultParameters parameters, Object[] values) {

    Assert.notNull(parameters, "Parameters must not be null!");
    Assert.notNull(values, "Values must not be null!");

    Assert.isTrue(parameters.getNumberOfParameters() == values.length, "Invalid number of parameters given!");

    this.parameters = parameters;
    this.values = values.clone();
    this.accessor = new ParametersParameterAccessor(parameters, this.values);
}
项目:spring-vault    文件:VaultQueryCreatorUnitTests.java   
VaultQuery createQuery(String methodName, String value) {

        DefaultParameters defaultParameters = new DefaultParameters(
                ReflectionUtils.findMethod(dummy.class, "someUnrelatedMethod",
                        String.class));

        PartTree partTree = new PartTree(methodName, Credentials.class);
        VaultQueryCreator queryCreator = new VaultQueryCreator(
                partTree,
                new ParametersParameterAccessor(defaultParameters, new Object[] { value }),
                mappingContext);

        return queryCreator.createQuery().getCriteria();
    }
项目:spring-vault    文件:VaultQueryCreatorUnitTests.java   
VaultQuery createQuery(String methodName, List<String> value) {

        DefaultParameters defaultParameters = new DefaultParameters(
                ReflectionUtils
                        .findMethod(dummy.class, "someUnrelatedMethod", List.class));

        PartTree partTree = new PartTree(methodName, Credentials.class);
        VaultQueryCreator queryCreator = new VaultQueryCreator(
                partTree,
                new ParametersParameterAccessor(defaultParameters, new Object[] { value }),
                mappingContext);

        return queryCreator.createQuery().getCriteria();
    }
项目:spring-vault    文件:VaultQueryCreatorUnitTests.java   
VaultQuery createQuery(String methodName, String value, String anotherValue) {

        DefaultParameters defaultParameters = new DefaultParameters(
                ReflectionUtils.findMethod(dummy.class, "someUnrelatedMethod",
                        String.class, String.class));

        PartTree partTree = new PartTree(methodName, Credentials.class);
        VaultQueryCreator queryCreator = new VaultQueryCreator(partTree,
                new ParametersParameterAccessor(defaultParameters, new Object[] { value,
                        anotherValue }), mappingContext);

        return queryCreator.createQuery().getCriteria();
    }
项目:ef-orm    文件:GqQueryExecution.java   
@Override
protected Object doExecute(AbstractGqQuery repositoryQuery, Object[] values) {
    long total = repositoryQuery.getResultCount(values);
    ParameterAccessor accessor = new ParametersParameterAccessor(parameters, values);
    Pageable pageable = accessor.getPageable();
    if (pageable.getOffset() >= total) {
        return new PageImpl<Object>(Collections.emptyList(), pageable, total);
    }
    List<?> content = repositoryQuery.getResultList(values, pageable);
    return new PageImpl<>(content, pageable, total);
}
项目:spring-data-keyvalue    文件:KeyValuePartTreeQuery.java   
@Override
public Object execute(Object[] parameters) {

    ParameterAccessor accessor = new ParametersParameterAccessor(getQueryMethod().getParameters(), parameters);
    KeyValueQuery<?> query = prepareQuery(parameters);
    ResultProcessor processor = queryMethod.getResultProcessor().withDynamicProjection(accessor);

    return processor.processResult(doExecute(parameters, query));
}
项目:spring-data-keyvalue    文件:KeyValuePartTreeQuery.java   
@SuppressWarnings({ "rawtypes", "unchecked" })
protected KeyValueQuery<?> prepareQuery(KeyValueQuery<?> instance, Object[] parameters) {

    ParametersParameterAccessor accessor = new ParametersParameterAccessor(getQueryMethod().getParameters(),
            parameters);

    Object criteria = instance.getCriteria();

    if (criteria instanceof SpelCriteria || criteria instanceof SpelExpression) {

        SpelExpression spelExpression = getSpelExpression(criteria);
        EvaluationContext context = this.evaluationContextProvider.getEvaluationContext(getQueryMethod().getParameters(),
                parameters);
        criteria = new SpelCriteria(spelExpression, context);
    }

    KeyValueQuery<?> query = new KeyValueQuery(criteria);
    Pageable pageable = accessor.getPageable();
    Sort sort = accessor.getSort();

    query.setOffset(pageable.toOptional().map(Pageable::getOffset).orElse(-1L));

    if (pageable.isPaged()) {
        query.setRows(pageable.getPageSize());
    } else if (instance.getRows() >= 0) {
        query.setRows(instance.getRows());
    }

    query.setSort(sort.isUnsorted() ? instance.getSort() : sort);

    return query;
}
项目:spring-data-dynamodb    文件:PartTreeDynamoDBQuery.java   
@Override
public Query<T> doCreateQuery(Object[] values) {

    ParametersParameterAccessor accessor = new ParametersParameterAccessor(parameters, values);
    DynamoDBQueryCreator<T, ID> queryCreator = createQueryCreator(accessor);
    return queryCreator.createQuery();

}
项目:spring-data-dynamodb    文件:PartTreeDynamoDBQuery.java   
@Override
public Query<Long> doCreateCountQuery(Object[] values,boolean pageQuery) {

    ParametersParameterAccessor accessor = new ParametersParameterAccessor(parameters, values);
    DynamoDBCountQueryCreator<T, ID> queryCreator = createCountQueryCreator(accessor,pageQuery);
    return queryCreator.createQuery();

}
项目:spring-data-dynamodb    文件:AbstractDynamoDBQuery.java   
@Override
public Object execute(AbstractDynamoDBQuery<T, ID> dynamoDBQuery, Object[] values) {

    ParameterAccessor accessor = new ParametersParameterAccessor(parameters, values);
    Pageable pageable = accessor.getPageable();
    Query<T> query = dynamoDBQuery.doCreateQueryWithPermissions(values);

    List<T> results = query.getResultList();
    return createPage(results, pageable,dynamoDBQuery,values);
}
项目:spring-data-dynamodb    文件:AbstractDynamoDBQuery.java   
@Override
public Object execute(AbstractDynamoDBQuery<T, ID> dynamoDBQuery, Object[] values) {

    ParameterAccessor accessor = new ParametersParameterAccessor(parameters, values);
    Pageable pageable = accessor.getPageable();
    Query<T> query = dynamoDBQuery.doCreateQueryWithPermissions(values);
    List<T> results = query.getResultList();
    return createSlice(results, pageable);
}
项目:spring-data-jdbc    文件:ReflectionMethodsUtils.java   
public static ParametersParameterAccessor generateParameters(QueryMethod method) {
    return new ParametersParameterAccessor(method.getParameters(),
                                           new Object[method.getParameters().getNumberOfParameters()]);
}
项目:spring-data-snowdrop    文件:SnowdropStringQuery.java   
protected BaseQuery<?> createQuery(ParametersParameterAccessor parameterAccessor) {
  String queryString = replacePlaceholders(this.query, parameterAccessor);
  Class<?> entityClass = getQueryMethod().getEntityInformation().getJavaType();
  return new StringQuery<>(entityClass, queryString);
}
项目:spring-data-snowdrop    文件:AbstractSnowdropRepositoryQuery.java   
private Object executeInternal(ParametersParameterAccessor accessor) {
    BaseQuery<?> query = createQuery(accessor);

    Class<?> projectionClass = getProjection(accessor);
    if (projectionClass != null) {
        ProjectionInformation pi = getQueryMethod().getFactory().getProjectionInformation(projectionClass);
        query.setProjectionInformation(pi);
    }

    Sort sort = query.getSort();
    if (sort == null) {
        sort = accessor.getSort();
    } else {
        sort = sort.and(accessor.getSort());
    }
    query.setSort(sort);

    if (query.getPageable() == null) {
        query.setPageable(accessor.getPageable());
    }

    if (isModify(query)) {
        throw new UnsupportedOperationException("Hibernate Search repository support is read-only!");
    } else if (getQueryMethod().isSliceQuery()) {
        return snowdropOperations.findSlice(query);
    } else if (getQueryMethod().isPageQuery()) {
        return snowdropOperations.findPageable(query);
    } else if (getQueryMethod().isStreamQuery()) {
        return snowdropOperations.stream(query);
    } else if (getQueryMethod().isCollectionQuery()) {
        return snowdropOperations.findAll(query);
    } else if (isCountProjection(query)) {
        return snowdropOperations.count(query);
    } else if (isExistsProjection(query)) {
        return (snowdropOperations.count(query) > 0);
    } else if ((projectionClass != null) || getQueryMethod().isQueryForEntity()) {
        return snowdropOperations.findSingle(query);
    } else {
        throw new IllegalArgumentException("Invalid query type.");
    }
}
项目:spring-data-ebean    文件:PartTreeEbeanQuery.java   
private Sort getDynamicSort(Object[] values) {
  return parameters.potentiallySortsDynamically() ? new ParametersParameterAccessor(parameters, values).getSort()
      : null;
}
项目:dubbox-solr    文件:SolrParametersParameterAccessor.java   
public SolrParametersParameterAccessor(SolrQueryMethod solrQueryMethod, Object[] values) {
    this.parameters = solrQueryMethod.getParameters();
    this.parametersParameterAccessorDelegate = new ParametersParameterAccessor(this.parameters, values.clone());
}
项目:ef-orm    文件:GqPartTreeQuery.java   
private Query<?> createQuery(Object[] values, boolean withPageSort) {
    Query<?> q = QB.create(metadata);
    ParametersParameterAccessor accessor = new ParametersParameterAccessor(
            parameters, values);
    Or or = new Or();
    int index = 0;
    for (GqOrPart node : tree) {
        And and = new And();
        for (GqPart part : node) {
            PropertyPath path = part.getProperty();
            if (path.getOwningType().getType() != metadata.getThisType()) {
                throw new IllegalArgumentException("PathType:"
                        + path.getOwningType().getType() + "  metadata:"
                        + metadata.getThisType());
            }
            String fieldName = path.getSegment();
            ColumnMapping field = metadata.findField(fieldName);
            PairIO<GqParameter> paramInfo = getBindParamIndex(index++,
                    fieldName);
            Object obj = accessor.getBindableValue(paramInfo.first);
            if (field != null) {
                IgnoreIf ignore = paramInfo.second.getIgnoreIf();
                if (ignore == null || !QueryUtils.isIgnore(ignore, obj)) {
                    add(and, part, field.field(), obj);
                }
            }
        }
        or.addCondition(and);
    }
    q.addCondition(or);

    if (withPageSort) {
        Sort sort = tree.getSort();
        if (accessor.getSort() != null) {
            sort = accessor.getSort();
        }
        Pageable page = accessor.getPageable();
        if (page != null && page.getSort() != null) {
            sort = page.getSort();
        }
        if (sort != null)
            setSortToSpec(q, sort, metadata);
    }
    return q;
}
项目:spring-data-solr    文件:SolrParametersParameterAccessor.java   
public SolrParametersParameterAccessor(SolrQueryMethod solrQueryMethod, Object[] values) {
    this.parameters = solrQueryMethod.getParameters();
    this.parametersParameterAccessorDelegate = new ParametersParameterAccessor(this.parameters, values.clone());
}
项目:spring-data-hazelcast    文件:HazelcastPartTreeQuery.java   
/**
 * <P>
 * Handle {@code @Param}.
 * </P>
 * <OL>
 * <LI><B>Without {@code @Param}</B>
 * <P>
 * Arguments to the call are assumed to follow the same sequence as cited in the method name.
 * </P>
 * <P>
 * Eg.
 * 
 * <pre>
 * findBy<U>One</U>And<U>Two</U>(String <U>one</U>, String <U>two</U>);
 * </pre>
 * </P>
 * </LI>
 * <LI><B>With {@code @Param}</B>
 * <P>
 * Arguments to the call are use the {@code @Param} to match them against the fields.
 * <P>
 * Eg.
 * 
 * <pre>
 * findBy<U>One</U>And<U>Two</U>(@Param("two") String <U>two</U>, @Param("one") String <U>one</U>);
 * </pre>
 * </P>
 * </LI>
 * </OL>
 *
 * @param parameters Possibly empty
 * @param partTree Query tree to traverse
 * @return Paremeters in correct order
 */
private ParametersParameterAccessor prepareAccessor(final Object[] originalParameters, final PartTree partTree) {

    if (!this.isRearrangeKnown) {
        this.prepareRearrange(partTree, this.queryMethod.getParameters().getBindableParameters());
        this.isRearrangeKnown = true;
    }

    Object[] parameters = originalParameters;
    if (parameters != null && this.isRearrangeRequired) {
        parameters = new Object[originalParameters.length];

        for (int i = 0; i < parameters.length; i++) {
            int index = rearrangeIndex[i];
            parameters[i] = originalParameters[index];
        }
    }

    return new ParametersParameterAccessor(this.queryMethod.getParameters(), parameters);
}
项目:spring-data-keyvalue    文件:KeyValuePartTreeQuery.java   
protected KeyValueQuery<?> prepareQuery(Object[] parameters) {

        return prepareQuery(createQuery(new ParametersParameterAccessor(getQueryMethod().getParameters(), parameters)),
                parameters);
    }
项目:spring-data-dynamodb    文件:PartTreeDynamoDBQuery.java   
protected DynamoDBQueryCreator<T, ID> createQueryCreator(ParametersParameterAccessor accessor) {
    return new DynamoDBQueryCreator<T, ID>(tree, accessor, queryMethod.getEntityInformation(), dynamoDBOperations);
}
项目:spring-data-dynamodb    文件:PartTreeDynamoDBQuery.java   
protected DynamoDBCountQueryCreator<T, ID> createCountQueryCreator(ParametersParameterAccessor accessor,boolean pageQuery) {
    return new DynamoDBCountQueryCreator<T, ID>(tree, accessor, queryMethod.getEntityInformation(), dynamoDBOperations,
            pageQuery);
}
项目:spring-data-mybatis    文件:AbstractMybatisQuery.java   
private Object doExecute(MybatisQueryExecution execution, Object[] parameters) {

        Object result = execution.execute(this, parameters);

        ParametersParameterAccessor accessor = new ParametersParameterAccessor(method.getParameters(), parameters);
        ResultProcessor withDynamicProjection = method.getResultProcessor().withDynamicProjection(accessor);

        return withDynamicProjection.processResult(result, new TupleConverter(withDynamicProjection.getReturnedType()));
    }
项目:spring-data-ebean    文件:PartTreeEbeanQuery.java   
/**
 * Creates a new {@link Query} for the given parameter values.
 *
 * @param values
 * @return
 */
public Object createQuery(Object[] values) {
  ParametersParameterAccessor accessor = new ParametersParameterAccessor(parameters, values);
  EbeanQueryCreator ebeanQueryCreator = createCreator(accessor);
  return restrictMaxResultsIfNecessary((Query) invokeBinding(getBinder(values), ebeanQueryCreator.createQuery()));
}
项目:spring-data-ebean    文件:ParameterMetadataProvider.java   
/**
 * Creates a new {@link ParameterMetadataProvider} from the given
 * {@link ParametersParameterAccessor} with impl for parameter value customizations.
 *
 * @param accessor must not be {@literal null}.
 */
public ParameterMetadataProvider(ParametersParameterAccessor accessor) {
  this(accessor.iterator(), accessor.getParameters());
}