Class ResourceWrapper

  • All Implemented Interfaces:
    FacesWrapper<Resource>

    public abstract class ResourceWrapper
    extends Resource
    implements FacesWrapper<Resource>

    Provides a simple implementation of Resource that can be subclassed by developers wishing to provide specialized behavior to an existing Resource instance. The default implementation of all methods is to call through to the wrapped Resource.

    Usage: extend this class and push the implementation being wrapped to the constructor and use getWrapped() to access the instance being wrapped.

    Since:
    2.0
    • Constructor Detail

      • ResourceWrapper

        public ResourceWrapper​(Resource wrapped)

        If this resource has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. The getWrapped() will then return the implementation being wrapped.

        Parameters:
        wrapped - The implementation being wrapped.
        Since:
        2.3
      • ResourceWrapper

        @Deprecated
        public ResourceWrapper()
        Deprecated.
        Use the other constructor taking the implementation being wrapped.