类 ParameterNameDiscoverer

java.lang.Object
cn.taketoday.core.ParameterNameDiscoverer
直接已知子类:
CompositeParameterNameDiscoverer, LocalVariableTableParameterNameDiscoverer, ReflectiveParameterNameDiscoverer

public abstract class ParameterNameDiscoverer extends Object
abstract class to discover parameter names for methods and constructors.

Parameter name discovery is not always possible, but various strategies are available to try, such as looking for debug information that may have been emitted at compile time, and looking for argname annotation values optionally accompanying AspectJ annotated methods.

从以下版本开始:
4.0
作者:
Rod Johnson, Adrian Colyer, TODAY 2021/9/10 22:33
  • 构造器详细资料

    • ParameterNameDiscoverer

      public ParameterNameDiscoverer()
  • 方法详细资料

    • getParameterNames

      @Nullable public String[] getParameterNames(@Nullable Executable executable)
      Return parameter names for an Executable(method or constructor), or null if they cannot be determined.

      Individual entries in the array may be null if parameter names are only available for some parameters of the given method but not for others. However, it is recommended to use stub parameter names instead wherever feasible.

      参数:
      executable - the Executable(method or constructor) to find parameter names for
      返回:
      an array of parameter names if the names can be resolved, or null if they cannot
      另请参阅:
    • doGet

      @Nullable protected String[] doGet(Executable executable)
    • getSharedInstance

      public static ParameterNameDiscoverer getSharedInstance()
      shared instance
    • findParameterNames

      @Nullable public static String[] findParameterNames(@Nullable Executable executable)
      Return parameter names for an Executable(method or constructor), or null if they cannot be determined.

      Individual entries in the array may be null if parameter names are only available for some parameters of the given method but not for others. However, it is recommended to use stub parameter names instead wherever feasible.

      参数:
      executable - the Executable(method or constructor) to find parameter names for
      返回:
      an array of parameter names if the names can be resolved, or null if they cannot
      另请参阅: