Class SlingHttpServletResponseWrapper

    • Constructor Detail

      • SlingHttpServletResponseWrapper

        public SlingHttpServletResponseWrapper​(SlingHttpServletResponse wrappedResponse)
        Create a wrapper for the supplied wrappedRequest
        Parameters:
        wrappedResponse - The response
    • Method Detail

      • adaptTo

        public <AdapterType> AdapterType adaptTo​(java.lang.Class<AdapterType> type)
        Description copied from interface: Adaptable
        Adapts the adaptable to another type.

        Please note that it is explicitly left as an implementation detail whether each call to this method with the same type yields the same object or a new object on each call.

        Implementations of this method should document their adapted types as well as their behaviour with respect to returning newly created or same instances on each call.

        Specified by:
        adaptTo in interface Adaptable
        Type Parameters:
        AdapterType - The generic type to which this object is adapted to
        Parameters:
        type - The Class object of the target type, such as javax.jcr.Node.class or java.io.File.class
        Returns:
        The adapter target or null if the object cannot adapt to the requested type