Module lettuce.core

Class Parameter

java.lang.Object
io.lettuce.core.dynamic.parameter.Parameter
Direct Known Subclasses:
ExecutionSpecificParameters.ExecutionAwareParameter

public class Parameter
extends Object
Abstracts a method parameter and exposes access to type and parameter information.
Since:
5.0
Author:
Mark Paluch
  • Constructor Details

    • Parameter

      public Parameter​(Method method, int parameterIndex)
  • Method Details

    • findAnnotation

      public <A extends Annotation> A findAnnotation​(Class<A> annotationType)
      Return the parameter annotation of the given type, if available.
      Parameters:
      annotationType - the annotation type to look for
      Returns:
      the annotation object, or null if not found
    • getAnnotations

      public List<? extends Annotation> getAnnotations()
      Return all parameter annotations.
      Returns:
      the List of annotation objects.
    • getParameterIndex

      public int getParameterIndex()
      Returns:
      the parameter index.
    • getParameterType

      public Class<?> getParameterType()
      Returns:
      the parameter type.
    • getTypeInformation

      public TypeInformation<?> getTypeInformation()
      Returns:
      the parameter TypeInformation.
    • isAssignableTo

      public boolean isAssignableTo​(Class<?> target)
      Check whether the parameter is assignable to target.
      Parameters:
      target - must not be null.
      Returns:
    • isSpecialParameter

      public boolean isSpecialParameter()
      Returns:
      true if the parameter is a special parameter.
    • getName

      public String getName()
      Returns:
      the parameter name or null if not available.