Class BundleSupport


  • public class BundleSupport
    extends Object
    Support to locate bundle services.
    For annotations providing bundle support, a META-INF/service entry must be created manually in order to be processed by the BundleFactory at runtime as well as the analyze-, checker and i18n maven plugins at build time.
    Author:
    harald
    See Also:
    Bundle, BundleFactory
    • Field Detail

      • BUNDLE_SERVICE

        public static final String BUNDLE_SERVICE
        The service name to find all annotations to mark classes as bundles.
        Such as @Bundle or @FxControllerService.

        The bundle service entry may optionally hold the path to the resource bundle property file. If missing, the resource name will be created from the classname.

    • Constructor Detail

      • BundleSupport

        public BundleSupport​(ModuleInfo info,
                             String className,
                             String bundleName)
        Creates a bundle support object.
        Parameters:
        info - the optional jigsaw module info, null if none
        className - the name of the annotated class
        bundleName - the name of the resource bundle
    • Method Detail

      • getBundles

        public static List<BundleSupport> getBundles​(ClassLoader classLoader)
        Finds all bundle services.
        Parameters:
        classLoader - the classloader, null if default
        Returns:
        the list of bundle supports
      • getModuleInfo

        public ModuleInfo getModuleInfo()
        Gets the module info.
        Returns:
        the optional module info, null if none
      • getClassName

        public String getClassName()
        Gets the name of the annotated class.
        Returns:
        the annotated class name
      • getBundleName

        public String getBundleName()
        Gets the bundle name.
        Returns:
        the bundle name