Package com.pyranid
Class DefaultInstanceProvider
java.lang.Object
com.pyranid.DefaultInstanceProvider
- All Implemented Interfaces:
InstanceProvider
Basic implementation of
InstanceProvider
which uses Class.newInstance()
.- Since:
- 1.0.0
- Author:
- Mark Allen
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DefaultInstanceProvider
public DefaultInstanceProvider()
-
-
Method Details
-
provide
Description copied from interface:InstanceProvider
Provides an instance of the giveninstanceClass
.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:
instanceClass
- the type of instance to create- Returns:
- an instance of the given
instanceClass
-