public class LocaleFacet extends AbstractLogAwareFacet
log
Constructor and Description |
---|
LocaleFacet(org.apache.maven.plugin.logging.Log log,
Locale newLocale)
Compound constructor creating a LocaleFacet wrapping the supplied instances.
|
Modifier and Type | Method and Description |
---|---|
static LocaleFacet |
createFor(String localeString,
org.apache.maven.plugin.logging.Log log)
Helper method used to parse a locale configuration string into a Locale instance.
|
void |
restore()
Restores the original Environment, implying that the change performed in
setup()
method are restored to the state before the setup method was called. |
void |
setup()
Sets up this Environment, inferring temporary changes to environment variables or conditions.
|
public LocaleFacet(org.apache.maven.plugin.logging.Log log, Locale newLocale)
log
- The active Maven Log.newLocale
- The non-null Locale to be set by this LocaleFacet during execution.public void setup()
restore()
method.
Changes the Locale during the execution of the plugin.
public void restore()
setup()
method are restored to the state before the setup method was called.
Restores the original locale following the plugin's execution.
public static LocaleFacet createFor(String localeString, org.apache.maven.plugin.logging.Log log) throws org.apache.maven.plugin.MojoExecutionException
localeString
- A configuration string parameter on the form
<language>[,<country>[,<variant>]]
log
- The active Maven Log. Cannot be null.org.apache.maven.plugin.MojoExecutionException
- if the localeString was not supplied on the required form.Copyright © 2005–2015 MojoHaus. All rights reserved.