Package io.kjson.resource
Class SyntheticResource
-
- All Implemented Interfaces:
public final class SyntheticResource<T extends Object> extends Resource<T>
A
SyntheticResourcemay be used to represent an internally-generated Resource.Peter Wall
-
-
Field Summary
Fields Modifier and Type Field Description private final URLurlprivate final BooleanisDirectory
-
Constructor Summary
Constructors Constructor Description SyntheticResource(String name, T value, ResourceLoader<T> resourceLoader)
-
Method Summary
-
-
Constructor Detail
-
SyntheticResource
SyntheticResource(String name, T value, ResourceLoader<T> resourceLoader)
-
-
Method Detail
-
open
ResourceDescriptor open()
Open a Resource for reading. The result of this function is a ResourceDescriptor, which contains an open
InputStreamand all the metadata known about the resource.
-
resolve
Resource<T> resolve(String relativeURL)
Resolve a relative URL against the current
Resource, returning a newResource.
-
load
T load()
Load the resource. This function is delegated to the ResourceLoader, which will load a resource of the target type.
-
-
-
-