public class InjectionPlan
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.List<Injection> |
qualifiedInjections |
private java.util.Set<java.lang.String> |
qualifiers |
private java.util.List<java.lang.reflect.Field> |
testSubjectFields |
private java.util.List<Injection> |
unqualifiedInjections |
Constructor and Description |
---|
InjectionPlan() |
Modifier and Type | Method and Description |
---|---|
void |
addInjection(Injection injection)
Add an
Injection to this container. |
void |
addTestSubjectField(java.lang.reflect.Field f)
Add a field that should be treated as a test subject injection target.
|
private void |
blockDuplicateQualifiers(java.lang.String qualifier) |
java.util.List<Injection> |
getQualifiedInjections()
Get all injections having fieldName qualifiers.
|
java.util.List<java.lang.reflect.Field> |
getTestSubjectFields()
Get fields identified as test subjects to which injection of mocks should be attempted.
|
java.util.List<Injection> |
getUnqualifiedInjections()
Get all injections that do not have fieldName qualifiers.
|
private final java.util.List<java.lang.reflect.Field> testSubjectFields
private final java.util.List<Injection> qualifiedInjections
private final java.util.List<Injection> unqualifiedInjections
private final java.util.Set<java.lang.String> qualifiers
public void addInjection(Injection injection)
Injection
to this container. It will be managed according to the presence
of a fieldName qualifier, and attempting to add an Injection with a duplicate fieldName
qualifier will cause an error.injection
- Injection to manage as part of this planprivate void blockDuplicateQualifiers(java.lang.String qualifier)
public void addTestSubjectField(java.lang.reflect.Field f)
f
- Field representing a test subject to which injection of mocks will be attemptedpublic java.util.List<java.lang.reflect.Field> getTestSubjectFields()
public java.util.List<Injection> getQualifiedInjections()
public java.util.List<Injection> getUnqualifiedInjections()