public class DefaultMockInjectionProvider extends Object implements InjectionProvider<Object>
Constructor and Description |
---|
DefaultMockInjectionProvider(Class<?> annotationClass,
InjectionConfiguration injectionConfiguration) |
Modifier and Type | Method and Description |
---|---|
Object |
getInjectedObject(Class<?> type)
Provides an instance of
T . |
Object |
getKey(InjectionTargetInformation injectionTargetInformation)
Returns a key object, which identifies the provided object.
|
boolean |
verify(InjectionTargetInformation injectionTargetInformation)
Verifies the injection target.
|
public DefaultMockInjectionProvider(Class<?> annotationClass, InjectionConfiguration injectionConfiguration)
annotationClass
- injection annotation like Resource, EJB, Inject, ...injectionConfiguration
- the configurationpublic Object getInjectedObject(Class<?> type)
InjectionProvider
T
.getInjectedObject
in interface InjectionProvider<Object>
type
- the type of the injection target.T
public boolean verify(InjectionTargetInformation injectionTargetInformation)
InjectionVerifier
verify
in interface InjectionVerifier
injectionTargetInformation
- information about the injection pointpublic Object getKey(InjectionTargetInformation injectionTargetInformation)
InjectionProvider
getKey
in interface InjectionProvider<Object>
injectionTargetInformation
- information about the injection pointNeedleTestcase.getInjectedObject(Object)
Copyright © 2014. All rights reserved.