类 ResolvableMethodParameter

java.lang.Object
cn.taketoday.core.AttributeAccessorSupport
cn.taketoday.web.handler.method.ResolvableMethodParameter
所有已实现的接口:
cn.taketoday.core.AttributeAccessor, Serializable
直接已知子类:
ParameterResolverMethodParameter

public class ResolvableMethodParameter extends cn.taketoday.core.AttributeAccessorSupport
Abstraction for Parameter

this Class supports resolving its parameter in a RequestContext

provides some common information like 'required','defaultValue', see more RequestParam

从以下版本开始:
2.3.7
作者:
TODAY
另请参阅:
  • 字段详细资料

    • typeDescriptor

      @Nullable protected cn.taketoday.core.TypeDescriptor typeDescriptor
      从以下版本开始:
      3.0.1
    • parameter

      private final cn.taketoday.core.MethodParameter parameter
    • namedValueInfo

      @Nullable private NamedValueInfo namedValueInfo
    • resolvableType

      @Nullable private cn.taketoday.core.ResolvableType resolvableType
    • nestedParam

      @Nullable private ResolvableMethodParameter nestedParam
  • 构造器详细资料

    • ResolvableMethodParameter

      public ResolvableMethodParameter(ResolvableMethodParameter other)
      从以下版本开始:
      4.0
    • ResolvableMethodParameter

      public ResolvableMethodParameter(cn.taketoday.core.MethodParameter parameter)
    • ResolvableMethodParameter

      ResolvableMethodParameter(ResolvableMethodParameter other, cn.taketoday.core.MethodParameter parameter)
  • 方法详细资料

    • isArray

      public boolean isArray()
    • isCollection

      public boolean isCollection()
    • isInterface

      public boolean isInterface()
    • is

      public boolean is(Class<?> type)
    • isAssignableTo

      public boolean isAssignableTo(Class<?> superClass)
    • isInstance

      public boolean isInstance(Object obj)
    • getMethodAnnotations

      public Annotation[] getMethodAnnotations()
      Return the annotations associated with the target method itself.
    • getMethodAnnotation

      @Nullable public <A extends Annotation> A getMethodAnnotation(Class<A> annotationType)
      Return the method annotation of the given type, if available.
      参数:
      annotationType - the annotation type to look for
      返回:
      the annotation object, or null if not found
    • hasMethodAnnotation

      public <A extends Annotation> boolean hasMethodAnnotation(Class<A> annotationType)
      Return whether the method is annotated with the given type.
      参数:
      annotationType - the annotation type to look for
      另请参阅:
    • getParameterAnnotations

      public Annotation[] getParameterAnnotations()
      Return the annotations associated with the specific method parameter.
    • hasParameterAnnotations

      public boolean hasParameterAnnotations()
      Return true if the parameter has at least one annotation, false if it has none.
      另请参阅:
    • hasParameterAnnotation

      public boolean hasParameterAnnotation(Class<? extends Annotation> annotationType)
      Return whether the parameter is declared with the given annotation type.
      参数:
      annotationType - the annotation type to look for
      另请参阅:
    • getParameterAnnotation

      @Nullable public <A extends Annotation> A getParameterAnnotation(Class<A> annotationType)
      Return the parameter annotation of the given type, if available.
      参数:
      annotationType - the annotation type to look for
      返回:
      the annotation object, or null if not found
    • getResolvableType

      public cn.taketoday.core.ResolvableType getResolvableType()
    • hasNamedValueInfo

      public boolean hasNamedValueInfo()
    • getNamedValueInfo

      public NamedValueInfo getNamedValueInfo()
      Obtain the named value for the given method parameter.
    • isRequired

      public boolean isRequired()
    • isNotRequired

      public boolean isNotRequired()
    • getName

      public String getName()
    • getDefaultValue

      @Nullable public String getDefaultValue()
    • withNamedValueInfo

      public void withNamedValueInfo(NamedValueInfo namedValueInfo)
    • createNamedValueInfo

      protected NamedValueInfo createNamedValueInfo()
      Create the NamedValueInfo object for the given method parameter. Implementations typically retrieve the method annotation by means of MethodParameter.getParameterAnnotation(Class).
      返回:
      the named value information
    • updateNamedValueInfo

      private NamedValueInfo updateNamedValueInfo(NamedValueInfo info)
      Create a new NamedValueInfo based on the given NamedValueInfo with sanitized values.
      另请参阅:
      • Nullable
    • getParameterName

      public String getParameterName()
    • getParameterIndex

      public int getParameterIndex()
    • getMethod

      public Method getMethod()
      Return the wrapped Method, if any.
      返回:
      the Method
    • resolveParameter

      @Nullable public Object resolveParameter(RequestContext request) throws Throwable
      simple impl
      参数:
      request - Current request context
      返回:
      parameter object
      抛出:
      Throwable
    • getParameterType

      public Class<?> getParameterType()
    • getComponentType

      public Class<?> getComponentType()
    • getParameter

      public cn.taketoday.core.MethodParameter getParameter()
    • isOptional

      public boolean isOptional()
      Return whether this method indicates a parameter which is not required: either in the form of Java 8's Optional, any variant of a parameter-level Nullable annotation (such as from JSR-305 or the FindBugs set of annotations), or a language-level nullable type declaration or Continuation parameter in Kotlin.
      从以下版本开始:
      4.0
    • isNullable

      public boolean isNullable()
      Return whether this method indicates a parameter which can be null: either in the form of any variant of a parameter-level Nullable annotation (such as from JSR-305 or the FindBugs set of annotations), or a language-level nullable type declaration
      从以下版本开始:
      4.0
    • nestedIfOptional

      public ResolvableMethodParameter nestedIfOptional()
      Return a variant of this MethodParameter which points to the same parameter but one nesting level deeper in case of a Optional declaration.
      从以下版本开始:
      4.0
      另请参阅:
    • nested

      public ResolvableMethodParameter nested()
      Return a variant of this ResolvableMethodParameter which points to the same parameter but one nesting level deeper.
      从以下版本开始:
      4.0
    • nested

      public ResolvableMethodParameter nested(@Nullable Integer typeIndex)
      Return a variant of this ResolvableMethodParameter which points to the same parameter but one nesting level deeper.
      参数:
      typeIndex - the type index for the new nesting level
      从以下版本开始:
      4.0
    • nested

      protected ResolvableMethodParameter nested(cn.taketoday.core.MethodParameter parameter)
    • getTypeDescriptor

      public cn.taketoday.core.TypeDescriptor getTypeDescriptor()
      从以下版本开始:
      3.0.1
    • createTypeDescriptor

      protected cn.taketoday.core.TypeDescriptor createTypeDescriptor()
      从以下版本开始:
      4.0
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 cn.taketoday.core.AttributeAccessorSupport
    • toString

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

      public boolean equals(Object obj)
      覆盖:
      equals 在类中 cn.taketoday.core.AttributeAccessorSupport