java.lang.Object
cloud.piranha.resource.impl.ClassResource
- All Implemented Interfaces:
Resource
A resource backed by a class.
- Author:
- Manfred Riem ([email protected])
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns all the locations for this resource.getName()
Get the name of this resourcegetResource
(String location) Get the resource.getResourceAsStream
(String location) Get the resource as a stream.toString()
-
Constructor Details
-
ClassResource
Constructor.- Parameters:
className
- the class name.
-
-
Method Details
-
getResource
Description copied from interface:Resource
Get the resource.- Specified by:
getResource
in interfaceResource
- Parameters:
location
- the location.- Returns:
- the URL.
-
getResourceAsStream
Description copied from interface:Resource
Get the resource as a stream.- Specified by:
getResourceAsStream
in interfaceResource
- Parameters:
location
- the location.- Returns:
- the resource as a stream, or null if not found.
-
getAllLocations
Description copied from interface:Resource
Returns all the locations for this resource.- Specified by:
getAllLocations
in interfaceResource
- Returns:
- all the locations for this resource
-
getName
Description copied from interface:Resource
Get the name of this resource -
toString
-