Package-level declarations
Types
A class for managing a group of assets together, such that they can be loaded or unloaded en masse. AssetGroup should be subclassed and the assets should be defined by properties in the subclass by using asset or, delayedAsset, which can be used as delegates. If not using delegates, it is possible to selectively load and unload them, in which case it is not advised to use loadAll and unloadAll, because AssetManager's reference counts may be thrown off.
Represents an Asset wrapper of resource loaded at demand. The first asset getter call causes the asset to be scheduled for loading and loaded eagerly - the AssetManager is updated until the asset is reported as loaded. Note that eager asset loading might cause other assets to be loaded synchronously rather than asynchronously, so it is advised to load eager assets with another AssetManager instance or use them after all regular assets are already loaded.
An implementation of DisposableRegistry that can be subclassed or used as a delegate. Allows to store and dispose of multiple Disposable instances.
Interface describing a container for Disposables that provides functions for disposing all its registered items. An implementing class's Disposable declarations can be tagged with .alsoRegister() to conveniently register them as they are instantiated and assigned.
Default implementation of Asset. Keeps asset data in an AssetDescriptor and delegates asset loading to an AssetManager. Assumes the asset was already scheduled for loading.
Allows reading text files with an AssetManager. Must be registered via setLoader.
Functions
Allows to quickly prepare a typed AssetDescriptor instance with more Kotlin-friendly syntax.
Allows to dispose a collection of resources implementing Disposable interface. Will silently ignore stored nulls. This method does not affect the Array structure in any way: no elements are removed from the array.
Allows to dispose a collection of resources implementing Disposable interface. Will silently ignore stored nulls. This method does not affect the Iterable structure in any way: no elements are removed from the collection.
Allows to dispose a resource implementing Disposable interface. Will silently ignore nulls. Exceptions will be caught and passed to onError function. This is basically an alternative to try-catch block usage.
Allows to dispose a collection of resources implementing Disposable interface. Will silently ignore stored nulls. Exceptions during asset disposing will be caught and passed to onError function. This method does not affect the Array structure in any way: no elements are removed from the array.
Allows to dispose a collection of resources implementing Disposable interface. Will silently ignore stored nulls. Exceptions during asset disposing will be caught and passed to onError function. This method does not affect the Iterable structure in any way: no elements are removed from the collection.
Allows to gracefully dispose a resource implementing Disposable interface. Will silently ignore nulls and exceptions (except for JVM internal Errors, which should not be caught anyway).
Allows to dispose a collection of resources implementing Disposable interface. Will silently ignore stored nulls and exceptions thrown during disposing (except for JVM internal Errors, which should not be caught anyway). This method does not affect the Array structure in any way: no elements are removed from the array.
Allows to dispose a collection of resources implementing Disposable interface. Will silently ignore stored nulls and exceptions thrown during disposing (except for JVM internal Errors, which should not be caught anyway). This method does not affect the Iterable structure in any way: no elements are removed from the collection.
Decorates this FileHandleResolver with a ResolutionFileResolver.
Utility for accessing AssetLoader instances stored by the AssetManager.
Creates a FileHandleResolver.
This method does nothing. This is a null-safe call that allows to clearly mark an exception as ignored. This approach is preferred to an empty catch block, as at development time you can create custom ignore() methods for each specific Exception types, import them and pass some debugging or logging code to each implementation. For example:
Allows to use a Pool instance as a functional object. When invoked with no parameters, Pool will provide an instance of the pooled object type.
Allows to use a Pool instance as a functional object. When invoked with a parameter, Pool will treat the passed parameter as an object freed to the pool.
Factory method for ResolutionFileResolver.Resolution that allows to used named parameters.
Decorates this FileHandleResolver with a PrefixFileHandleResolver.