ResourceResolver
final class ResourceResolver
Package: dev.joid.lib.resource.resolver · Module: core · Source: ResourceResolver.java
The registry of resource resolvers that Resource.of(...) asks for inputs it cannot read itself.
Description
Section titled “Description”It holds a TextureResourceResolver and a BufferedImageResourceResolver by default.
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
void | register(IResourceResolver resolver) static | Registers a resolver before the others: the last registered is asked first. |
void | unregister(IResourceResolver resolver) static | Removes a resolver. |
boolean | supports(Object input) static | If true, a registered resolver supports the input. |
Resource | resolve(ResourceBuilder builder, Object input) static | Returns the resource of the first resolver that supports the input. |
Method details
Section titled “Method details”register
Section titled “register”void register(IResourceResolver resolver) static
Registers a resolver before the others: the last registered is asked first.
unregister
Section titled “unregister”void unregister(IResourceResolver resolver) static
Removes a resolver.
supports
Section titled “supports”boolean supports(Object input) static
If true, a registered resolver supports the input.
resolve
Section titled “resolve”Resource resolve(ResourceBuilder builder, Object input) static
Throws:
IllegalArgumentException: No resource resolver knows the input … of type …, register an IResourceResolver that supports it with ResourceResolver.register(…)
Returns the resource of the first resolver that supports the input.
Throws an IllegalArgumentException that names the type of the input when none supports it.
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
