public class AdapterManagerImpl extends Object implements org.apache.sling.api.adapter.AdapterManager
AdapterManagerImpl
class implements the
AdapterManager
interface and is registered as a service for that
interface to be used by any clients.Constructor and Description |
---|
AdapterManagerImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
activate(org.osgi.service.component.ComponentContext context)
Activate the manager.
|
protected void |
bindAdapterFactory(org.osgi.framework.ServiceReference<org.apache.sling.api.adapter.AdapterFactory> reference)
Bind a new adapter factory.
|
protected void |
deactivate(org.osgi.service.component.ComponentContext context)
Deactivate
|
<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<org.apache.sling.api.adapter.AdapterFactory> reference)
Unbind a adapter factory.
|
public <AdapterType> AdapterType getAdapter(Object adaptable, Class<AdapterType> type)
adaptable
or null
if
the object cannot be adapted.getAdapter
in interface org.apache.sling.api.adapter.AdapterManager
AdapterManager.getAdapter(java.lang.Object, java.lang.Class)
protected void activate(org.osgi.service.component.ComponentContext context)
context
- Component contextprotected void deactivate(org.osgi.service.component.ComponentContext context)
context
- Not usedprotected void bindAdapterFactory(org.osgi.framework.ServiceReference<org.apache.sling.api.adapter.AdapterFactory> reference)
protected void unbindAdapterFactory(org.osgi.framework.ServiceReference<org.apache.sling.api.adapter.AdapterFactory> reference)
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.