Interface EnvironmentFacet
- All Known Implementing Classes:
AbstractLogAwareFacet
,ContextClassLoaderEnvironmentFacet
,LocaleFacet
,LoggingHandlerEnvironmentFacet
,SystemPropertyChangeEnvironmentFacet
,SystemPropertySaveEnvironmentFacet
,ToolExecutionEnvironment
public interface EnvironmentFacet
Specification for an Environment controller, which can infer a temporary and reversible change
to the environment of an executing task. Any changes performed by this Environment
must be reversible, and should be restored to their original values in the restore()
method.
EnvironmentFacets are required since the JDK tools (XJC, SchemaGen, JXC) expect certain configuration or setup to be present during their execution. For improved usability within the JAXB2-Maven-Plugin, we would like to supply all configuration to the plugin, and delegate the setting of various system-, thread-, logging- or environment properties to explicit EnvironmentFacet implementations.
- Since:
- 2.1
-
Method Summary
Modifier and TypeMethodDescriptionvoid
restore()
Restores the original Environment, implying that the change performed insetup()
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.
-
Method Details
-
setup
void setup()Sets up this Environment, inferring temporary changes to environment variables or conditions. The changes must be reversible, and should be restored to their original values in therestore()
method. -
restore
void restore()Restores the original Environment, implying that the change performed insetup()
method are restored to the state before the setup method was called.
-