Package net.officefloor.test
Class ObjectTestDependencyService<T,O extends T>
java.lang.Object
net.officefloor.test.ObjectTestDependencyService<T,O>
- All Implemented Interfaces:
TestDependencyService
public class ObjectTestDependencyService<T,O extends T>
extends Object
implements TestDependencyService
TestDependencyService providing an Object instance.-
Constructor Summary
ConstructorsConstructorDescriptionObjectTestDependencyService(Class<T> type, O object) Instantiate specifying more genericObjecttype.ObjectTestDependencyService(O object) Instantiate usingObjecttype. -
Method Summary
Modifier and TypeMethodDescriptiongetObject(TestDependencyServiceContext context) Obtains the dependency object.booleanIndicates if able to provide object.
-
Constructor Details
-
Method Details
-
isObjectAvailable
Description copied from interface:TestDependencyServiceIndicates if able to provide object.- Specified by:
isObjectAvailablein interfaceTestDependencyService- Parameters:
context-TestDependencyServiceContext.- Returns:
trueif able to provide object.
-
getObject
public Object getObject(TestDependencyServiceContext context) throws UnknownObjectException, Throwable Description copied from interface:TestDependencyServiceObtains the dependency object.- Specified by:
getObjectin interfaceTestDependencyService- Parameters:
context-TestDependencyServiceContext.- Returns:
- Object.
- Throws:
UnknownObjectException- If unknown bound object name.Throwable- If failure in obtaining the bound object.
-