Package org.junit.experimental.theories
Class ParameterSignature
- java.lang.Object
-
- org.junit.experimental.theories.ParameterSignature
-
public class ParameterSignature extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.annotation.Annotation[]
annotations
private static java.util.Map<java.lang.Class<?>,java.lang.Class<?>>
CONVERTABLE_TYPES_MAP
private java.lang.Class<?>
type
-
Constructor Summary
Constructors Modifier Constructor Description private
ParameterSignature(java.lang.Class<?> type, java.lang.annotation.Annotation[] annotations)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.util.Map<java.lang.Class<?>,java.lang.Class<?>>
buildConvertableTypesMap()
boolean
canAcceptType(java.lang.Class<?> candidate)
boolean
canAcceptValue(java.lang.Object candidate)
boolean
canPotentiallyAcceptType(java.lang.Class<?> candidate)
private <T extends java.lang.annotation.Annotation>
TfindDeepAnnotation(java.lang.annotation.Annotation[] annotations, java.lang.Class<T> annotationType, int depth)
<T extends java.lang.annotation.Annotation>
TfindDeepAnnotation(java.lang.Class<T> annotationType)
<T extends java.lang.annotation.Annotation>
TgetAnnotation(java.lang.Class<T> annotationType)
java.util.List<java.lang.annotation.Annotation>
getAnnotations()
java.lang.Class<?>
getType()
boolean
hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> type)
private boolean
isAssignableViaTypeConversion(java.lang.Class<?> targetType, java.lang.Class<?> candidate)
private static <T> void
putSymmetrically(java.util.Map<T,T> map, T a, T b)
private static java.util.ArrayList<ParameterSignature>
signatures(java.lang.Class<?>[] parameterTypes, java.lang.annotation.Annotation[][] parameterAnnotations)
static java.util.List<ParameterSignature>
signatures(java.lang.reflect.Constructor<?> constructor)
static java.util.ArrayList<ParameterSignature>
signatures(java.lang.reflect.Method method)
-
-
-
Method Detail
-
buildConvertableTypesMap
private static java.util.Map<java.lang.Class<?>,java.lang.Class<?>> buildConvertableTypesMap()
-
putSymmetrically
private static <T> void putSymmetrically(java.util.Map<T,T> map, T a, T b)
-
signatures
public static java.util.ArrayList<ParameterSignature> signatures(java.lang.reflect.Method method)
-
signatures
public static java.util.List<ParameterSignature> signatures(java.lang.reflect.Constructor<?> constructor)
-
signatures
private static java.util.ArrayList<ParameterSignature> signatures(java.lang.Class<?>[] parameterTypes, java.lang.annotation.Annotation[][] parameterAnnotations)
-
canAcceptValue
public boolean canAcceptValue(java.lang.Object candidate)
-
canAcceptType
public boolean canAcceptType(java.lang.Class<?> candidate)
-
canPotentiallyAcceptType
public boolean canPotentiallyAcceptType(java.lang.Class<?> candidate)
-
isAssignableViaTypeConversion
private boolean isAssignableViaTypeConversion(java.lang.Class<?> targetType, java.lang.Class<?> candidate)
-
getType
public java.lang.Class<?> getType()
-
getAnnotations
public java.util.List<java.lang.annotation.Annotation> getAnnotations()
-
hasAnnotation
public boolean hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> type)
-
findDeepAnnotation
public <T extends java.lang.annotation.Annotation> T findDeepAnnotation(java.lang.Class<T> annotationType)
-
findDeepAnnotation
private <T extends java.lang.annotation.Annotation> T findDeepAnnotation(java.lang.annotation.Annotation[] annotations, java.lang.Class<T> annotationType, int depth)
-
getAnnotation
public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationType)
-
-