@Service
@Property(name="service.description",value="Sling Adapter Manager") @Property(name="service.vendor",value="The Apache Software Foundation")
@Reference(name="AdapterFactory",
referenceInterface=org.apache.sling.api.adapter.AdapterFactory.class,
cardinality=OPTIONAL_MULTIPLE,
policy=DYNAMIC)
public class MockAdapterManagerImpl
extends Object
implements org.apache.sling.api.adapter.AdapterManager
ThreadsafeMockAdapterManagerWrapper concept.| Constructor and Description |
|---|
MockAdapterManagerImpl() |
| 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 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 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.AdapterManagerAdapterManager.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 reference)
protected void unbindAdapterFactory(org.osgi.framework.ServiceReference reference)
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.