Package ca.uhn.fhir.util.adapters
Interface IAdapterFactory
public interface IAdapterFactory
Interface for external service that builds adaptors for targets.
-
Method Summary
Modifier and TypeMethodDescription<T> Optional
<T> getAdapter
(Object theObject, Class<T> theAdapterType) Build an adaptor for the target.Collection
<Class<?>>
-
Method Details
-
getAdapter
Build an adaptor for the target. May return empty() even if the target type is listed in getAdapters() when the factory fails to convert a particular instance.- Parameters:
theObject
- the object to be adapted.theAdapterType
- the target type- Returns:
- the adapter, if possible.
-
getAdapters
Collection<Class<?>> getAdapters()- Returns:
- the collection of adapter target types handled by this factory.
-