Package com.pyranid
Class DefaultInstanceProvider
java.lang.Object
com.pyranid.DefaultInstanceProvider
- All Implemented Interfaces:
InstanceProvider
Basic implementation of
InstanceProvider
.- Since:
- 1.0.0
- Author:
- Mark Allen
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
provide
(StatementContext<T> statementContext, Class<T> instanceType) Provides an instance of the giveninstanceType
.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pyranid.InstanceProvider
provideRecord
-
Constructor Details
-
DefaultInstanceProvider
public DefaultInstanceProvider()
-
-
Method Details
-
provide
@Nonnull public <T> T provide(@Nonnull StatementContext<T> statementContext, @Nonnull Class<T> instanceType) Description copied from interface:InstanceProvider
Provides an instance of the giveninstanceType
.Whether the instance is new every time or shared/reused is implementation-dependent.
- Specified by:
provide
in interfaceInstanceProvider
- Type Parameters:
T
- instance type token- Parameters:
instanceType
- the type of instance to create- Returns:
- an instance of the given
instanceType
-