de.akquinet.jbosscc.needle.injection
Class MockProviderInjectionProvider

java.lang.Object
  extended by de.akquinet.jbosscc.needle.injection.MockProviderInjectionProvider
All Implemented Interfaces:
InjectionProvider<MockProvider>, InjectionVerifier

public class MockProviderInjectionProvider
extends Object
implements InjectionProvider<MockProvider>


Constructor Summary
MockProviderInjectionProvider(MockProvider mockProvider)
           
 
Method Summary
 MockProvider getInjectedObject(Class<?> injectionPointType)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockProviderInjectionProvider

public MockProviderInjectionProvider(MockProvider mockProvider)
Method Detail

getInjectedObject

public MockProvider getInjectedObject(Class<?> injectionPointType)
Description copied from interface: InjectionProvider
Provides an instance of T.

Specified by:
getInjectedObject in interface InjectionProvider<MockProvider>
Parameters:
injectionPointType - the type of the injection target.
Returns:
instance of T

verify

public boolean verify(InjectionTargetInformation injectionTargetInformation)
Description copied from interface: InjectionVerifier
Verifies the injection target.

Specified by:
verify in interface InjectionVerifier
Parameters:
injectionTargetInformation - information about the injection point
Returns:
true, if the provided object is injectable to the given injection information, otherwise false.

getKey

public Object getKey(InjectionTargetInformation injectionTargetInformation)
Description copied from interface: InjectionProvider
Returns a key object, which identifies the provided object.

Specified by:
getKey in interface InjectionProvider<MockProvider>
Parameters:
injectionTargetInformation - information about the injection point
Returns:
the key of the provided object
See Also:
NeedleTestcase.getInjectedObject(Object)


Copyright © 2013 akquinet AG. All Rights Reserved.