public class InjectionTarget
extends java.lang.Object
Injection to a target field.| Constructor | Description |
|---|---|
InjectionTarget(java.lang.reflect.Field f) |
Create instance for injection to the given field.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
accepts(Injection injection) |
Can the given Injection be applied to this InjectionTarget?
|
java.lang.reflect.Field |
getTargetField() |
Get the field to which injections will be assigned.
|
void |
inject(java.lang.Object obj,
Injection injection) |
Perform the injection against the given object set the "matched" status of the injection when successful.
|
public InjectionTarget(java.lang.reflect.Field f)
f - Field that will receive the Injectionpublic boolean accepts(Injection injection)
injection - candidate Injectionpublic void inject(java.lang.Object obj,
Injection injection)
obj - Object instance on which to perform injection.injection - Injection containing mock to assign.public java.lang.reflect.Field getTargetField()
Copyright © 2001-2019 EasyMock contributors. This documentation is provided under the terms of the Apache 2 licence.