java.lang.Object
org.easymock.internal.InjectionTarget
Applies an
Injection
to a target field.- Since:
- 3.3
- Author:
- Henri Tremblay, Alistair Todd
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Can the given Injection be applied to this InjectionTarget?Get the field to which injections will be assigned.void
Perform the injection against the given object set the "matched" status of the injection when successful.
-
Constructor Details
-
InjectionTarget
Create instance for injection to the given field.- Parameters:
f
- Field that will receive theInjection
-
-
Method Details
-
accepts
Can the given Injection be applied to this InjectionTarget?- Parameters:
injection
- candidate Injection- Returns:
- true if injection represents a mock that can be applied to this InjectionTarget, false if the mock is of a type that cannot be assigned
-
inject
Perform the injection against the given object set the "matched" status of the injection when successful.- Parameters:
obj
- Object instance on which to perform injection.injection
- Injection containing mock to assign.
-
getTargetField
Get the field to which injections will be assigned.- Returns:
- target field for injection assignment.
-