Schnittstelle ResourceLocator

Alle bekannten Implementierungsklassen:
DefaultResourceLocator
Funktionsschnittstelle:
Dies ist eine funktionale Schnittstelle, die somit als Zuweisungsziel für einen Lambdaausdruck oder eine Methodenreferenz verwendet werden kann.

@FunctionalInterface public interface ResourceLocator
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.

  • Methodendetails

    • discover

      static ResourceLocator discover()
      Searches for specified implementations of ResourceLocator using the ServiceLoader mechanism.
      Gibt zurück:
      the discovered implementation or the default DefaultResourceLocator
    • getResourceBundle

      ResourceBundle getResourceBundle(String name)
      This method method replaces the standard afterburner dependency injection.
      Parameter:
      name - The name of the bundle
      Gibt zurück:
      a fully initialized presenter with injected dependencies.