java.lang.Object
org.bzdev.obnaming.ObnamingUtils
Utility class to get resource bundles, etc.
After Java 8, the module system restricts the visibility
of various classes. This is a utility class that will
enable one to get a resource bundle associated with the
org.bzdev.obnaming module. It is used by automatically
generated code during initialization. As this code will
be in other packages and modules, this class has to be
public and in an exported package.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceBundle
Get a resource bundle visible to the obnaming packagestatic void
setPropertiesForXMLResource
(Properties properties, String path) Set properties using a resource storing the properties in XML format.
-
Constructor Details
-
ObnamingUtils
public ObnamingUtils()
-
-
Method Details
-
getBundle
Get a resource bundle visible to the obnaming package- Parameters:
name
- the class name for the bundle- Returns:
- the corresponding bundle
-
setPropertiesForXMLResource
public static void setPropertiesForXMLResource(Properties properties, String path) throws IOException, NullPointerException Set properties using a resource storing the properties in XML format.- Parameters:
properties
- the property object to setpath
- a path visible to the module org.bzdev.obnaming and denoting the resource.- Throws:
NullPointerException
- the path was nullIOException
- an IO error or XML error occurred- See Also:
-