Package org.anchoranalysis.bean
Interface Provider<T>
- Type Parameters:
T- the item the bean creates
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Provider<T>
A class (usually an
AnchorBean) that creates or otherwise supplies another object.
This is like a CheckedSupplier but throws a particular type of exception.
It is a convenient base-class for a set of beans that provide similar functionality creating or referencing existing objects.
- Author:
- Owen Feehan
-
Method Details
-
get
Gets or creates an object of typeT.- Returns:
- the object returned by the provider.
- Throws:
ProvisionFailedException- if the object cannot be returned.
-