org.apache.sling.api.adapter
Interface Adaptable

All Known Subinterfaces:
Resource, ResourceResolver, SlingHttpServletRequest, SlingHttpServletResponse
All Known Implementing Classes:
AbstractResource, MockResource, MockResourceResolver, MockSlingHttpServletRequest, NonExistingResource, ResourceWrapper, SlingAdaptable, SlingAdaptable, SlingHttpServletRequestWrapper, SlingHttpServletResponseWrapper, SyntheticResource

public interface Adaptable


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

Method Detail

adaptTo

<AdapterType> AdapterType adaptTo(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-2011 The Apache Software Foundation. All Rights Reserved.