Skip to content

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.

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.

ReturnsSignatureSummary
booleansupports(Object handle) abstractIf true, this locator turns handle into an asset.
Assetlocate(Object handle) abstractReturns the asset of handle; JOID calls it only when supports returned true.

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. 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

Report a problem with this page