| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Map | |
| private static final Map |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static boolean | |
| public static Class | Returns: parameter types.an array of parameters. parameters)Extracts class instances from parameters. |
| public static boolean | Returns: matches or notMatches an array of parameters to an array of instances. |
| public static boolean | Returns: matches or notarray of class instances to check against. classes, final Object[] instances to be verified. args)Matches an array of class instances to an array of instances. |
| public static Parameter[] | Returns: Injects free array of class instances.array of parameter instances under question. parameters, final Set<InjectableParameter> filters to use. filters)Omits 1. |
| public static Parameter[] | Returns: extracted constructor parameters.any valid constructor. constructor)Extracts constructor parameters. |
| public static Parameter[] | Returns: extracted method parameters.any valid method. method)Extracts method parameters. |
| private static void | |
| private static void | |
| public static Object[] | Returns: injected arguments.array of parameter instances under question. parameters, final Set<InjectableParameter> filters to use. filters, final Object[] user supplied arguments. args, final Method current test method. injectionMethod, final ITestContext current test context. context, final ITestResult on going test results. testResult)Injects appropriate arguments. |
| public static Object[] | Returns: injected arguments.array of parameter instances under question. parameters, final Set<InjectableParameter> filters to use. filters, final Object[] user supplied arguments. args, final Constructor<?> current test method. constructor, final ITestContext current test context. context, final ITestResult on going test results. testResult)Injects appropriate arguments. |
| public static boolean | Returns: is an instance-of or notreference class. reference, final Object instance to be tested. object)Checks if an instance is an instance of the given class. |
| public static boolean | Returns: would an instance of 'clazz' be an instance of reference class.reference class instance. reference, final Class<?> class instance to be tested. clazz)Checks a class instance for being a given class or its sub-class. |
| public static boolean | Returns: would an instance of 'clazz' be an instance of reference interface.reference interface instance. reference, final Class<?> class instance to be tested. clazz)Checks a class instance for being a given interface or its implementation. |
| public static boolean | Returns: matches or notMatches an array of parameters to an array of instances. |
| public static boolean | Returns: matches or notarray of class instances to check against. classes, final Object[] instances to be verified. args)Matches an array of class instances to an array of instances. |
| public static boolean | |
| public static boolean | Returns: matches or notarray of class instances to check against. classes, final Object[] instances to be verified. args)Matches an array of class instances to an array of instances having last class instance an array. |
| private static Object[] | nativelyInject(final Parameter[] parameters, final Set<InjectableParameter> filters, final Object[] args, final Object injectionMethod, final ITestContext context, final ITestResult testResult)
|
| ASSIGNABLE_MAPPING | back to summary |
|---|---|
| private static final Map<Class<?>, List<Class<?>>> ASSIGNABLE_MAPPING | |
| PRIMITIVE_MAPPING | back to summary |
|---|---|
| private static final Map<Class<?>, Class<?>> PRIMITIVE_MAPPING | |
| ReflectionRecipes | back to summary |
|---|---|
| private ReflectionRecipes() | |
| canInject | back to summary |
|---|---|
| private static boolean canInject(final Parameter parameter, final InjectableParameter injectableParameter) | |
| classesFromParameters | back to summary |
|---|---|
| public static Class Extracts class instances from parameters. | |
| exactMatch | back to summary |
|---|---|
| public static boolean exactMatch(final Parameter[] parameters, final Object[] args) Matches an array of parameters to an array of instances.
| |
| exactMatch | back to summary |
|---|---|
| public static boolean exactMatch(final Class<?>[] classes, final Object[] args) Matches an array of class instances to an array of instances. | |
| filter | back to summary |
|---|---|
| public static Parameter[] filter(final Parameter[] parameters, final Set<InjectableParameter> filters) Omits 1. org.testng.ITestContext or its implementations from input array 2. org.testng.ITestResult or its implementations from input array 3. org.testng.xml.XmlTest or its implementations from input array 4. First method depending on filters. An example would be Input: {ITestContext.class, int.class, Boolean.class, TestContext.class} Output: {int.class, Boolean.class}
| |
| getConstructorParameters | back to summary |
|---|---|
| public static Parameter[] getConstructorParameters(final Constructor<?> constructor) Extracts constructor parameters.
| |
| getMethodParameters | back to summary |
|---|---|
| public static Parameter[] getMethodParameters(final Method method) Extracts method parameters. | |
| initAssignableMapping | back to summary |
|---|---|
| private static void initAssignableMapping() | |
| initPrimitiveMapping | back to summary |
|---|---|
| private static void initPrimitiveMapping() | |
| inject | back to summary |
|---|---|
| public static Object[] inject(final Parameter[] parameters, final Set<InjectableParameter> filters, final Object[] args, final Method injectionMethod, final ITestContext context, final ITestResult testResult) Injects appropriate arguments.
| |
| inject | back to summary |
|---|---|
| public static Object[] inject(final Parameter[] parameters, final Set<InjectableParameter> filters, final Object[] args, final Constructor<?> constructor, final ITestContext context, final ITestResult testResult) Injects appropriate arguments.
| |
| isInstanceOf | back to summary |
|---|---|
| public static boolean isInstanceOf(final Class<?> reference, final Object object) Checks if an instance is an instance of the given class. | |
| isOrExtends | back to summary |
|---|---|
| public static boolean isOrExtends(final Class<?> reference, final Class<?> clazz) Checks a class instance for being a given class or its sub-class. | |
| isOrImplementsInterface | back to summary |
|---|---|
| public static boolean isOrImplementsInterface(final Class<?> reference, final Class<?> clazz) Checks a class instance for being a given interface or its implementation. | |
| lenientMatch | back to summary |
|---|---|
| public static boolean lenientMatch(final Parameter[] parameters, final Object[] args) Matches an array of parameters to an array of instances.
| |
| lenientMatch | back to summary |
|---|---|
| public static boolean lenientMatch(final Class<?>[] classes, final Object[] args) Matches an array of class instances to an array of instances. Such that {int, boolean, float} matches {int, boolean} | |
| matchArrayEnding | back to summary |
|---|---|
public static boolean matchArrayEnding(final Parameter[] parameters, final Object[] param)
| |
| matchArrayEnding | back to summary |
|---|---|
| public static boolean matchArrayEnding(final Class<?>[] classes, final Object[] args) Matches an array of class instances to an array of instances having last class instance an array. Assuming upper case letters denote classes and corresponding lowercase its instances. Classes {A,B,C...}, instances {a,b,c1,c2} ==> check for {a,b,{c1,c2}} match or Classes {A,B,C[]}, instances {a,b,c1,c2} ==> check for {a,b,{c1,c2}} match both of the above cases are equivalent. | |
| nativelyInject | back to summary |
|---|---|
| private static Object[] nativelyInject(final Parameter[] parameters, final Set<InjectableParameter> filters, final Object[] args, final Object injectionMethod, final ITestContext context, final ITestResult testResult) | |
| Modifier and Type | Field and Description |
|---|---|
| private final List |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv T |
| backingList | back to summary |
|---|---|
| private final List<T> backingList | |
| ListBackedImmutableQueue | back to summary |
|---|---|
| pack-priv ListBackedImmutableQueue(final T[] elements) | |
| poll | back to summary |
|---|---|
| pack-priv T poll() | |