Top Description Methods
com.airhacks.afterburner.views

public Interface ResourceLocator

Known Direct Implementers
com.airhacks.afterburner.views.DefaultResourceLocator
Annotations
@FunctionalInterface
Imports
java.util.List, .ResourceBundle, .ServiceLoader, java.util.stream.Collectors, .StreamSupport, org.slf4j.Logger, .LoggerFactory

The implementation of this interface is fully optional and only needed in case you would like to replaced the default algorithm to find resources. This may be useful if you have a global resource file with every translation key instead of a file per FXML view.

Afterburner will discover the implementations of this interface using the Java extension mechanism.

You will have to register the an implementation by placing a text file: META-INF/services/com.airhacks.afterburner.views.ResourceLocator containing the fully qualified name of the implementation.

Author
airhacks.com

Method Summary

Modifier and TypeMethod and Description
public static ResourceLocator

Returns:

the discovered implementation or the default DefaultResourceLocator
discover
()

Searches for specified implementations of ResourceLocator using the ServiceLoader mechanism.

public ResourceBundle

Returns:

a fully initialized presenter with injected dependencies.
getResourceBundle
(String
The name of the bundle
name
)

This method method replaces the standard afterburner dependency injection.

Method Detail

discoverback to summary
public static ResourceLocator discover()

Searches for specified implementations of ResourceLocator using the ServiceLoader mechanism.

Returns:ResourceLocator

the discovered implementation or the default DefaultResourceLocator

getResourceBundleback to summary
public ResourceBundle getResourceBundle(String name)

This method method replaces the standard afterburner dependency injection.

Parameters
name:String

The name of the bundle

Returns:ResourceBundle

a fully initialized presenter with injected dependencies.