T - - The type of the provided object.
Example for javax.inject.Qualifier: public class InjectionProvider() { @Override public boolean verify(final InjectionTargetInformation information) { return information.getAnnotation(CurrentUser.class) != null; } @Override public Object getKey(final InjectionTargetInformation information) { return CurrentUser.class; } @Override public User getInjectedObject(final Class> type) { return new User(); } }
public interface InjectionProvider<T> extends InjectionVerifier
T and verifies an injection target.| Modifier and Type | Method and Description |
|---|---|
T |
getInjectedObject(Class<?> injectionPointType)
Provides an instance of
T. |
Object |
getKey(InjectionTargetInformation injectionTargetInformation)
Returns a key object, which identifies the provided object.
|
verifyT getInjectedObject(Class<?> injectionPointType)
T.injectionPointType - the type of the injection target.TObject getKey(InjectionTargetInformation injectionTargetInformation)
injectionTargetInformation - information about the injection pointNeedleTestcase.getInjectedObject(Object)Copyright © 2014. All rights reserved.