- java.lang.Object
-
- org.tentackle.common.BundleSupport
-
public class BundleSupport extends java.lang.ObjectSupport 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 Summary
Fields Modifier and Type Field Description static java.lang.StringBUNDLE_SERVICEThe service name to find all annotations to mark classes as bundles.
Such as @Bundle or @FxControllerService.
-
Constructor Summary
Constructors Constructor Description BundleSupport(ModuleInfo info, java.lang.String className, java.lang.String bundleName)Creates a bundle support object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetBundleName()Gets the bundle name.static java.util.List<BundleSupport>getBundles(java.lang.ClassLoader classLoader)Finds all bundle services.java.lang.StringgetClassName()Gets the name of the annotated class.ModuleInfogetModuleInfo()Gets the module info.
-
-
-
Field Detail
-
BUNDLE_SERVICE
public static final java.lang.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, java.lang.String className, java.lang.String bundleName)
Creates a bundle support object.- Parameters:
info- the optional jigsaw module info, null if noneclassName- the name of the annotated classbundleName- the name of the resource bundle
-
-
Method Detail
-
getBundles
public static java.util.List<BundleSupport> getBundles(java.lang.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 java.lang.String getClassName()
Gets the name of the annotated class.- Returns:
- the annotated class name
-
getBundleName
public java.lang.String getBundleName()
Gets the bundle name.- Returns:
- the bundle name
-
-