@Generated(value="org.jomc.tools.SourceFileProcessor 1.9", comments="See http://www.jomc.org/jomc/1.9/jomc-tools-1.9") public abstract class AbstractJomcToolCommand extends AbstractModelCommand
JomcTool
based command implementation.
AbstractModletCommand.CommandLineClassLoader
Command.Listener
STATUS_FAILURE, STATUS_SUCCESS
Constructor and Description |
---|
AbstractJomcToolCommand()
Creates a new
AbstractJomcToolCommand instance. |
Modifier and Type | Method and Description |
---|---|
protected <T extends JomcTool> |
createJomcTool(String className,
Class<T> type,
CommandLine commandLine)
Creates a new
JomcTool object for a given class name and type. |
protected <T> T |
createObject(String className,
Class<T> type)
Creates a new object for a given class name and type.
|
protected Implementation |
getImplementation(CommandLine commandLine,
Model model)
Gets the implementation to process from a given model.
|
protected Locale |
getLocale(CommandLine commandLine)
Gets a locale from a command line.
|
protected Module |
getModule(CommandLine commandLine,
Model model)
Gets the module to process from a given model.
|
Options |
getOptions()
Gets the options of the command.
|
protected Specification |
getSpecification(CommandLine commandLine,
Model model)
Gets the specification to process from a given model.
|
protected boolean |
isModulesProcessingRequested(CommandLine commandLine)
Gets a flag indicating that all modules are requested to be processed.
|
protected void |
postExecuteCommand(CommandLine commandLine)
Called by the
execute method after the preExecuteCommand /executeCommand methods even if
those methods threw an exception. |
createModelContext, getModel
createTransformer, getDocumentFiles, getModel, log
execute, executeCommand, getAbbreviatedName, getDefaultLogLevel, getExceptionMessage, getListeners, getLogLevel, getLongDescription, getName, getShortDescription, isLoggable, log, preExecuteCommand, setDefaultLogLevel, setLogLevel
@Generated(value="org.jomc.tools.SourceFileProcessor 1.9", comments="See http://www.jomc.org/jomc/1.9/jomc-tools-1.9") public AbstractJomcToolCommand()
AbstractJomcToolCommand
instance.protected void postExecuteCommand(CommandLine commandLine) throws CommandExecutionException
execute
method after the preExecuteCommand
/executeCommand
methods even if
those methods threw an exception.postExecuteCommand
in class AbstractCommand
commandLine
- The command line to execute.CommandExecutionException
- if executing the command fails.AbstractCommand.execute(org.apache.commons.cli.CommandLine)
protected <T> T createObject(String className, Class<T> type) throws CommandExecutionException
T
- The type of the object to create.className
- The name of the class to create an object of.type
- The class of the type of object to create.className
.NullPointerException
- if className
or type
is null
.CommandExecutionException
- if creating a new object fails.protected <T extends JomcTool> T createJomcTool(String className, Class<T> type, CommandLine commandLine) throws CommandExecutionException
JomcTool
object for a given class name and type.T
- The type of the object to create.commandLine
- The CommandLine
to configure the new JomcTool
object with.className
- The name of the class to create an object of.type
- The class of the type of object to create.className
configured using commandLine
.NullPointerException
- if commandLine
, className
or type
is null
.CommandExecutionException
- if creating a new object fails.createObject(java.lang.String, java.lang.Class)
protected final Specification getSpecification(CommandLine commandLine, Model model)
commandLine
- The command line specifying the specification to process.model
- The model to get the specification to process from.null
.NullPointerException
- if commandLine
or model
is null
.protected final Implementation getImplementation(CommandLine commandLine, Model model)
commandLine
- The command line specifying the implementation to process.model
- The model to get the implementation to process from.null
.NullPointerException
- if commandLine
or model
is null
.protected final Module getModule(CommandLine commandLine, Model model)
commandLine
- The command line specifying the implementation to process.model
- The model to get the module to process from.null
.NullPointerException
- if model
is null
.protected final boolean isModulesProcessingRequested(CommandLine commandLine)
commandLine
- The command line to process.true
, if processing of all modules is requested; false
, else.NullPointerException
- if commandLine
is null
.getSpecification(org.apache.commons.cli.CommandLine, org.jomc.modlet.Model)
,
getImplementation(org.apache.commons.cli.CommandLine, org.jomc.modlet.Model)
,
getModule(org.apache.commons.cli.CommandLine, org.jomc.modlet.Model)
protected final Locale getLocale(CommandLine commandLine)
commandLine
- The command line to get a locale from.commandLine
or null
, if commandLine
does not hold options
specifying a locale.@Generated(value="org.jomc.tools.SourceFileProcessor 1.9", comments="See http://www.jomc.org/jomc/1.9/jomc-tools-1.9") public Options getOptions()
Options:
Specification | Implementation |
---|---|
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Classpath Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Country Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Default Template Encoding Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Default Template Profile Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Documents Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Implementation Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Indentation String Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Input Encoding Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Language Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Line Separator Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Locale Variant Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ ModelContextFactory Class Name Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Model Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Modlet Location Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Modlet Schema System Id Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Module Location Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Module Name Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ No Classpath Resolution Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ No Java Validation Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ No Model Processing Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ No Model Resource Validation Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ No Modlet Resource Validation Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Output Encoding Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Platform Provider Location Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Provider Location Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Specification Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Template Encoding Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Template Location Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Template Profile Option |
JOMC ⁑ CLI ⁑ Command Option (org.apache.commons.cli.Option) @ 1.2 |
JOMC ⁑ CLI ⁑ Transformer Location Option |
getOptions
in interface Command
getOptions
in class AbstractModelCommand
Copyright © 2005–2015 The JOMC Project. All rights reserved.