Class DefaultParameterContext

java.lang.Object
org.junit.jupiter.engine.execution.DefaultParameterContext
All Implemented Interfaces:
org.junit.jupiter.api.extension.AnnotatedElementContext, org.junit.jupiter.api.extension.ParameterContext

class DefaultParameterContext extends Object implements org.junit.jupiter.api.extension.ParameterContext
Since:
5.0
  • Field Details

    • parameter

      private final Parameter parameter
    • index

      private final int index
    • target

      private final Optional<Object> target
  • Constructor Details

  • Method Details

    • getParameter

      public Parameter getParameter()
      Specified by:
      getParameter in interface org.junit.jupiter.api.extension.ParameterContext
    • getIndex

      public int getIndex()
      Specified by:
      getIndex in interface org.junit.jupiter.api.extension.ParameterContext
    • getTarget

      public Optional<Object> getTarget()
      Specified by:
      getTarget in interface org.junit.jupiter.api.extension.ParameterContext
    • isAnnotated

      public boolean isAnnotated(Class<? extends Annotation> annotationType)
      Specified by:
      isAnnotated in interface org.junit.jupiter.api.extension.AnnotatedElementContext
      Specified by:
      isAnnotated in interface org.junit.jupiter.api.extension.ParameterContext
    • findAnnotation

      public <A extends Annotation> Optional<A> findAnnotation(Class<A> annotationType)
      Specified by:
      findAnnotation in interface org.junit.jupiter.api.extension.AnnotatedElementContext
      Specified by:
      findAnnotation in interface org.junit.jupiter.api.extension.ParameterContext
    • findRepeatableAnnotations

      public <A extends Annotation> List<A> findRepeatableAnnotations(Class<A> annotationType)
      Specified by:
      findRepeatableAnnotations in interface org.junit.jupiter.api.extension.AnnotatedElementContext
      Specified by:
      findRepeatableAnnotations in interface org.junit.jupiter.api.extension.ParameterContext
    • toString

      public String toString()
      Overrides:
      toString in class Object