Package io.kjson.resource
Class Resource
-
- All Implemented Interfaces:
public final class Resource<T extends Object>A resource, as described by a URL and loaded by a ResourceLoader.
Peter Wall
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classResource.Companion
-
Field Summary
Fields Modifier and Type Field Description private final URLresourceURLpublic final static Resource.CompanionCompanion
-
Method Summary
Modifier and Type Method Description final URLgetResourceURL()final Tload()Load the resource. final Resource<T>resolve(String relativeURL)Resolve a relative URL against the current Resource, returning a newResource.Booleanequals(Object other)IntegerhashCode()StringtoString()Create a string form of the URL for this Resourcesuitable for use in debugging and logging messages.-
-
Method Detail
-
getResourceURL
final URL getResourceURL()
-
load
final T load()
Load the resource. This function is delegated to the ResourceLoader, which will load a resource of the target type.
-
resolve
final Resource<T> resolve(String relativeURL)
Resolve a relative URL against the current
Resource, returning a newResource.
-
-
-
-