Package org.ocpsoft.common.spi
Interface ServiceEnricher
public interface ServiceEnricher
Provides enriching for services loaded with
ServiceLoader- Author:
- Lincoln Baxter, III
-
Method Summary
Modifier and TypeMethodDescription<T> voidenrich(T service) Enrich an instantiated instance of the given service type.<T> Collection<T>Produce aCollectionof enriched services of the given type.
-
Method Details
-
produce
Produce aCollectionof enriched services of the given type. If no instances were produced, this method must return an emptyCollection. Only oneServiceEnrichermay produce a service at any given time. If more than oneServiceEnrichermay produce the same service, only the first will be used. -
enrich
<T> void enrich(T service) Enrich an instantiated instance of the given service type. If no enriching took place, this method must return the original service without modification. This method is called only when the service was not produced by thisServiceEnricher; in that case, enrichment should have already taken place at the time of production.
-