@FunctionalInterface public interface Producer<T>
Modifier and Type | Method and Description |
---|---|
T |
produce()
Produces an empty inject object
|
default T |
produce(Class<?> metadata)
Produce an object for an
Inject.meta() class provided by the annotation |
default T produce(Class<?> metadata)
Inject.meta()
class provided by the annotation
This is for producing different implementations of the same superclass
The best practice is throwing an IllegalArgumentException
if you do not have more than one
implementation
metadata
- the provided class in the Inject
annotationCopyright © 2016. All rights reserved.