class ModuleXmlUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_FILENAME |
Modifier | Constructor and Description |
---|---|
private |
ModuleXmlUtil()
Private constructor.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
baseDirectory(ModuleIdentifier identifier)
Creates a path name from the module identifier with the default
File.separator character. |
static java.lang.String |
baseDirectory(ModuleIdentifier identifier,
java.lang.String separator)
Creates a path name from the module identifier.
|
static java.lang.String |
baseFilename(ModuleIdentifier identifier)
Creates a path name to the module XML file from the module identifier.
|
static java.lang.String |
baseFilename(java.lang.String name,
ModuleIdentifier identifier)
Creates a path name to the module XML file from the module identifier.
|
static java.lang.String |
baseFilename(java.lang.String name,
java.lang.String separator,
ModuleIdentifier identifier)
Creates a path name to the module XML
|
static java.io.File |
toFile(java.io.File dir,
ModuleIdentifier identifier)
Creates a file based on the directory and the module identifier.
|
static java.io.File |
toFile(java.io.File dir,
java.lang.String name,
ModuleIdentifier identifier)
Creates a file based on the directory and the module identifier.
|
public static final java.lang.String DEFAULT_FILENAME
public static java.io.File toFile(java.io.File dir, ModuleIdentifier identifier)
dir
parameter must be a directory and the identifier
cannot be null
.dir
- the base directory where the file should be located.identifier
- the module identifier.java.lang.IllegalArgumentException
- if the dir
parameter is not a directory or an argument is null
.public static java.io.File toFile(java.io.File dir, java.lang.String name, ModuleIdentifier identifier)
dir
parameter must be a directory and the identifier
cannot be null
.dir
- the base directory where the file should be located.name
- the name of the XML file.identifier
- the module identifier.java.lang.IllegalArgumentException
- if the dir
parameter is not a directory or an argument is null
.public static java.lang.String baseDirectory(ModuleIdentifier identifier, java.lang.String separator)
null
identifier will result in no separator being used.identifier
- the module identifier.separator
- the directory separator.java.lang.IllegalArgumentException
- if the module identifier is null
.public static java.lang.String baseDirectory(ModuleIdentifier identifier)
File.separator
character.identifier
- the module identifier.java.lang.IllegalArgumentException
- if the module identifier is null
.baseDirectory(ModuleIdentifier, String)
public static java.lang.String baseFilename(ModuleIdentifier identifier)
DEFAULT_FILENAME
for
the XML file name.identifier
- the module identifier.java.lang.IllegalArgumentException
- if the module identifier is null
.public static java.lang.String baseFilename(java.lang.String name, ModuleIdentifier identifier)
name
- the XML file name.identifier
- the module identifier.java.lang.IllegalArgumentException
- if the module identifier is null
.public static java.lang.String baseFilename(java.lang.String name, java.lang.String separator, ModuleIdentifier identifier)
name
- the XML file name. file from the module identifier.separator
- the directory separator.identifier
- the module identifier.java.lang.IllegalArgumentException
- if the module identifier is null
.