org.apache.sling.adapter.internal
Class AdapterManagerImpl
java.lang.Object
org.apache.sling.adapter.internal.AdapterManagerImpl
- All Implemented Interfaces:
- AdapterManager
public class AdapterManagerImpl
- extends Object
- implements AdapterManager
The AdapterManagerImpl
class implements the
AdapterManager
interface and is registered as a service for that
interface to be used by any clients.
Method Summary |
protected void |
activate(org.osgi.service.component.ComponentContext context)
|
protected void |
bindAdapterFactory(org.osgi.framework.ServiceReference reference)
|
protected void |
deactivate(org.osgi.service.component.ComponentContext context)
|
<AdapterType>
AdapterType |
|
getAdapter(Object adaptable,
Class<AdapterType> type)
Returns the adapted adaptable or null if
the object cannot be adapted. |
protected void |
unbindAdapterFactory(org.osgi.framework.ServiceReference reference)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdapterManagerImpl
public AdapterManagerImpl()
getAdapter
public <AdapterType> AdapterType getAdapter(Object adaptable,
Class<AdapterType> type)
- Returns the adapted
adaptable
or null
if
the object cannot be adapted.
- Specified by:
getAdapter
in interface AdapterManager
- Type Parameters:
AdapterType
- The generic type of the adapter (target) type.- Parameters:
adaptable
- The object to adapt to the adapter type.type
- The type to which the object is to be adapted.
- Returns:
- The adapted object or
null
if no factory exists to
adapt the adaptable
to the AdapterType
or if the adaptable
cannot be adapted for any other
reason.
activate
protected void activate(org.osgi.service.component.ComponentContext context)
deactivate
protected void deactivate(org.osgi.service.component.ComponentContext context)
- Parameters:
context
- Not used
bindAdapterFactory
protected void bindAdapterFactory(org.osgi.framework.ServiceReference reference)
unbindAdapterFactory
protected void unbindAdapterFactory(org.osgi.framework.ServiceReference reference)
Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.