org.apache.sling.api.adapter
Interface Adaptable

All Known Subinterfaces:
Resource, ResourceResolver
All Known Implementing Classes:
AuthorizableResource, MockResource, MockResourceResolver, NonExistingResource, ResourceWrapper, org.apache.sling.adapter.SlingAdaptable, SyntheticResource

public interface Adaptable


Method Summary
<AdapterType>
AdapterType
adaptTo(java.lang.Class<AdapterType> type)
          Adapts the adaptable to another type.
 

Method Detail

adaptTo

<AdapterType> AdapterType adaptTo(java.lang.Class<AdapterType> type)
Adapts the adaptable to another type.

Type Parameters:
AdapterType - The generic type to which this resource is adapted to
Parameters:
type - The Class object of the target type, such as Node.class
Returns:
The adapter target or null if the resource cannot adapt to the requested type


Copyright © 2007-2009. All Rights Reserved.