IAssetLocator
interface IAssetLocator
Known subtypes: FileAssetLocator, StreamAssetLocator, StringAssetLocator, SnapshotUrlAssetLocator
Package: dev.joid.lib.asset.locator · Module: core · Source: IAssetLocator.java
Turns one kind of input into an Asset, so that every loader of JOID accepts it.
Description
Section titled “Description”Register it with AssetLocator.register.
Return an asset with a stable id, such as a ClasspathAsset, so that the caches and a reload find the same content.
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
boolean | supports(Object handle) abstract | If true, this locator turns handle into an asset. |
Asset | locate(Object handle) abstract | Returns the asset of handle; JOID calls it only when supports returned true. |
Method details
Section titled “Method details”supports
Section titled “supports”boolean supports(Object handle) abstract
If true, this locator turns handle into an asset.
locate
Section titled “locate”Asset locate(Object handle) abstract
Returns the asset of handle; JOID calls it only when supports returned true.
Throw IllegalArgumentException when the input names nothing: the resource then fails instead of loading.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
