Class AliasedNamedResource

java.lang.Object
cloud.piranha.resource.AliasedNamedResource
All Implemented Interfaces:
Resource

public class AliasedNamedResource extends Object implements Resource
A Resource wrapper with a custom name
  • Constructor Details

    • AliasedNamedResource

      public AliasedNamedResource(Resource resource, String resourceName)
      Constructor
      Parameters:
      resource - the resource
      resourceName - the resource name
  • Method Details

    • getResource

      public URL getResource(String location)
      Description copied from interface: Resource
      Get the resource.
      Specified by:
      getResource in interface Resource
      Parameters:
      location - the location.
      Returns:
      the URL.
    • getResourceAsStream

      public InputStream getResourceAsStream(String location)
      Description copied from interface: Resource
      Get the resource as a stream.
      Specified by:
      getResourceAsStream in interface Resource
      Parameters:
      location - the location.
      Returns:
      the resource as a stream, or null if not found.
    • getAllLocations

      public Stream<String> getAllLocations()
      Description copied from interface: Resource
      Returns all the locations for this resource.
      Specified by:
      getAllLocations in interface Resource
      Returns:
      all the locations for this resource
    • getName

      public String getName()
      Description copied from interface: Resource
      Get the name of this resource
      Specified by:
      getName in interface Resource
      Returns:
      the name