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 java.lang.Object implements org.junit.jupiter.api.extension.ParameterContext
- Since:
- 5.0
-
-
Constructor Summary
Constructors Constructor Description DefaultParameterContext(java.lang.reflect.Parameter parameter, int index, java.util.Optional<java.lang.Object> target)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <A extends java.lang.annotation.Annotation>
java.util.Optional<A>findAnnotation(java.lang.Class<A> annotationType)
<A extends java.lang.annotation.Annotation>
java.util.List<A>findRepeatableAnnotations(java.lang.Class<A> annotationType)
int
getIndex()
java.lang.reflect.Parameter
getParameter()
java.util.Optional<java.lang.Object>
getTarget()
boolean
isAnnotated(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
java.lang.String
toString()
-
-
-
Method Detail
-
getParameter
public java.lang.reflect.Parameter getParameter()
- Specified by:
getParameter
in interfaceorg.junit.jupiter.api.extension.ParameterContext
-
getIndex
public int getIndex()
- Specified by:
getIndex
in interfaceorg.junit.jupiter.api.extension.ParameterContext
-
getTarget
public java.util.Optional<java.lang.Object> getTarget()
- Specified by:
getTarget
in interfaceorg.junit.jupiter.api.extension.ParameterContext
-
isAnnotated
public boolean isAnnotated(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
- Specified by:
isAnnotated
in interfaceorg.junit.jupiter.api.extension.AnnotatedElementContext
- Specified by:
isAnnotated
in interfaceorg.junit.jupiter.api.extension.ParameterContext
-
findAnnotation
public <A extends java.lang.annotation.Annotation> java.util.Optional<A> findAnnotation(java.lang.Class<A> annotationType)
- Specified by:
findAnnotation
in interfaceorg.junit.jupiter.api.extension.AnnotatedElementContext
- Specified by:
findAnnotation
in interfaceorg.junit.jupiter.api.extension.ParameterContext
-
findRepeatableAnnotations
public <A extends java.lang.annotation.Annotation> java.util.List<A> findRepeatableAnnotations(java.lang.Class<A> annotationType)
- Specified by:
findRepeatableAnnotations
in interfaceorg.junit.jupiter.api.extension.AnnotatedElementContext
- Specified by:
findRepeatableAnnotations
in interfaceorg.junit.jupiter.api.extension.ParameterContext
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-