类 ParameterResolvingStrategies

java.lang.Object
cn.taketoday.web.bind.resolver.ParameterResolvingStrategies
所有已实现的接口:
cn.taketoday.core.ArraySizeTrimmer, ParameterResolvingStrategy, Iterable<ParameterResolvingStrategy>

public class ParameterResolvingStrategies extends Object implements cn.taketoday.core.ArraySizeTrimmer, Iterable<ParameterResolvingStrategy>, ParameterResolvingStrategy
Composite ParameterResolvingStrategy
从以下版本开始:
4.0
作者:
TODAY 2021/9/26 21:07
  • 字段详细资料

  • 构造器详细资料

    • ParameterResolvingStrategies

      public ParameterResolvingStrategies()
    • ParameterResolvingStrategies

      public ParameterResolvingStrategies(int size)
    • ParameterResolvingStrategies

      ParameterResolvingStrategies(ArrayList<ParameterResolvingStrategy> strategies)
  • 方法详细资料

    • supportsParameter

      public boolean supportsParameter(ResolvableMethodParameter parameter)
      从接口复制的说明: ParameterResolvingStrategy
      Whether the given parameter is supported by this resolver.

      static match

      指定者:
      supportsParameter 在接口中 ParameterResolvingStrategy
    • resolveArgument

      @Nullable public Object resolveArgument(RequestContext context, ResolvableMethodParameter resolvable) throws Throwable
      从接口复制的说明: ParameterResolvingStrategy
      Resolve parameter
      指定者:
      resolveArgument 在接口中 ParameterResolvingStrategy
      参数:
      context - Current request context
      resolvable - resolvable parameter
      返回:
      method parameter instance
      抛出:
      Throwable - if any Exception occurred
      另请参阅:
    • add

      public void add(@Nullable ParameterResolvingStrategy resolver)
    • add

      public void add(@Nullable ParameterResolvingStrategy... resolver)
      add resolvers or resolving-strategies
      参数:
      resolver - resolvers or resolving-strategies
    • add

      public void add(@Nullable List<ParameterResolvingStrategy> resolvers)
      add resolvers or resolving-strategies
      参数:
      resolvers - resolvers or resolving-strategies
    • set

      public void set(@Nullable List<ParameterResolvingStrategy> resolver)
      set or clear resolvers
      参数:
      resolver - can be null
    • get

      @Nullable public ParameterResolvingStrategy get(Class<?> strategyClass)
      Returns the instance of the first occurrence of the specified strategy-class
      参数:
      strategyClass - strategy-class to search for
      返回:
      the instance of the first occurrence of the specified strategy-class
    • indexOf

      public int indexOf(Class<?> strategyClass)
      Returns the index of the first occurrence of the specified strategy-class in this list, or -1 if this list does not contain the strategy-class. More formally, returns the lowest index i such that -1 if there is no such index.
      参数:
      strategyClass - strategy-class to search for
      返回:
      the index of the first occurrence of the specified strategy-class in this list, or -1 if this list does not contain the strategy-class
    • lastIndexOf

      public int lastIndexOf(Class<?> strategyClass)
      Returns the index of the last occurrence of the specified strategy-class in this list, or -1 if this list does not contain the strategy-class. More formally, returns the highest index i such that -1 if there is no such index.
      参数:
      strategyClass - strategy-class to search for
      返回:
      the index of the last occurrence of the specified strategy-class in this list, or -1 if this list does not contain the strategy-class
    • set

      public ParameterResolvingStrategy set(int idx, ParameterResolvingStrategy strategy)
      Replaces the element at the specified position in this list with the specified element.
      参数:
      idx - index of the element to replace
      strategy - strategy to be stored at the specified position
      返回:
      the element previously at the specified position
      抛出:
      IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())
    • replace

      public boolean replace(Class<?> strategyClass, ParameterResolvingStrategy strategy)
      Replaces the element at the specified position in this list with the specified strategy-class.
      参数:
      strategyClass - strategy-class to search for
      strategy - new strategy
      返回:
      if replaced
    • removeIf

      public boolean removeIf(Predicate<ParameterResolvingStrategy> filter)
      Removes all the elements of this collection that satisfy the given predicate. Errors or runtime exceptions thrown during iteration or by the predicate are relayed to the caller.

      The default implementation traverses all elements of the collection using its List.iterator(). Each matching element is removed using Iterator.remove(). If the collection's iterator does not support removal then an UnsupportedOperationException will be thrown on the first matching element.

      参数:
      filter - a predicate which returns true for elements to be removed
      返回:
      true if any elements were removed
      抛出:
      NullPointerException - if the specified filter is null
      UnsupportedOperationException - if elements cannot be removed from this collection. Implementations may throw this exception if a matching element cannot be removed or if, in general, removal is not supported.
    • contains

      public boolean contains(Class<?> strategyClass)
      Returns true if resolvers list contains the specified resolverClass. More formally, returns true if and only if all resolvers contains at least one element e such that (resolverClass == resolver.getClass()).
      参数:
      strategyClass - element whose presence in this defaultResolvers or customizedResolvers is to be tested
      返回:
      true if resolvers contains the specified resolverClass
    • trimToSize

      public void trimToSize()
      指定者:
      trimToSize 在接口中 cn.taketoday.core.ArraySizeTrimmer
      从以下版本开始:
      4.0
    • getStrategies

      public ArrayList<ParameterResolvingStrategy> getStrategies()
    • iterator

      指定者:
      iterator 在接口中 Iterable<ParameterResolvingStrategy>
    • forEach

      public void forEach(Consumer<? super ParameterResolvingStrategy> action)
      指定者:
      forEach 在接口中 Iterable<ParameterResolvingStrategy>
    • spliterator

      public Spliterator<ParameterResolvingStrategy> spliterator()
      指定者:
      spliterator 在接口中 Iterable<ParameterResolvingStrategy>
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • size

      public int size()
      Returns the number of strategies in this list.
      返回:
      the number of strategies in this list
    • isEmpty

      public boolean isEmpty()
      Returns true if this strategies list contains no strategy.
      返回:
      true if this strategies list contains no strategy