@ProviderType public interface AdapterManager
AdapterManagerdefines the service interface for a manager for object adaption. The adapter manager coordinates the registered
AdapterFactoryservices on behalf of clients wishing to adapt objects to other types. One such client is the
SlingAdaptableclass, which uses the implementation of this bundle to adapt "itself".
Clients may either extend from the
SlingAdaptable class or access the
AdapterManager service from the OSGi service registry to adapt
objects to other types.
This interface is not intended to be implemented by clients.
|Modifier and Type||Field and Description|
The name under which this service is registered with the OSGi service registry.
|Modifier and Type||Method and Description|
Returns an adapter object of the requested
static final java.lang.String SERVICE_NAME
@Nullable <AdapterType> AdapterType getAdapter(@NotNull @NotNull java.lang.Object adaptable, @NotNull @NotNull java.lang.Class<AdapterType> type)
AdapterTypefor the given
adaptable object may be any non-
and is not required to implement the
AdapterType- The generic type of the adapter (target) type.
adaptable- The object to adapt to the adapter type.
type- The type to which the object is to be adapted.
nullif no factory exists to adapt the
AdapterTypeor if the
adaptablecannot be adapted for any other reason.
Copyright © 2010 - 2020 Adobe. All Rights Reserved