Package org.jibx.schema.codegen
Class CodeGenCommandLine
java.lang.Object
org.jibx.custom.CustomizationCommandLineBase
org.jibx.schema.codegen.CodeGenCommandLine
Command line processing specifically for the
CodeGen class.- Author:
- Dennis M. Sosnoski
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jibx.custom.CustomizationCommandLineBase
CustomizationCommandLineBase.ArgList -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String[]Ordered array of extra usage lines.private StringName used for root binding.private SchemasetCustomCustomizations model root.private StringDefault package for all schemas.private FileFile for checking differences in generated class structure (nullif none).private ListList of existing bindings to be included and used for matching schema definitions.private FileFile for dumping the generated class structure (nullif none).private StringDefault package for no-namespace schemas.private StringSchema root path.private FileRoot directory for schemas (nullif not a file system root).private URLRoot URL for schemas.private StringNamespace to be used for no-namespace schemas generated directly.private static final LoggerLogger for class.Fields inherited from class org.jibx.custom.CustomizationCommandLineBase
STRING_PARAMETER_ARRAY, STRING_UNMARSHALLER_PARAMETER_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MapapplyOverrides(Map overmap) Apply map of override values to customizations read from file or created as default.protected booleanCheck extension parameter.protected voidFinish processing of command line parameters.Get binding name.Get customizations model root.Get file to be used for finding differences in generated data model.Get the list of paths for bindings to be used for matching schema definitions.Get file to be used for dumping generated data model.Get default package for no-namespace schemas.Get root directory for schemas.Get root URL for schemas.Get namespace to be used when no schemas with namespaces are being generated.protected booleanloadCustomizations(String path) Load the customizations file.voidPrint usage information.Methods inherited from class org.jibx.custom.CustomizationCommandLineBase
getExtraArgs, getGeneratePath, getUsageLines, isVerbose, mergeUsageLines, processArgs, putKeyValue, verboseDetails
-
Field Details
-
s_logger
private static final Logger s_loggerLogger for class. -
EXTRA_USAGE_LINES
Ordered array of extra usage lines. -
m_nonamespacePackage
Default package for no-namespace schemas. -
m_defaultPackage
Default package for all schemas. -
m_rootPath
Schema root path. -
m_bindingName
Name used for root binding. -
m_usingNamespace
Namespace to be used for no-namespace schemas generated directly. -
m_schemaRoot
Root URL for schemas. -
m_schemaDir
Root directory for schemas (nullif not a file system root). -
m_modelFile
File for dumping the generated class structure (nullif none). -
m_differenceFile
File for checking differences in generated class structure (nullif none). -
m_customRoot
Customizations model root. -
m_includePaths
List of existing bindings to be included and used for matching schema definitions.
-
-
Constructor Details
-
CodeGenCommandLine
public CodeGenCommandLine()Constructor.
-
-
Method Details
-
getSchemaRoot
Get root URL for schemas.- Returns:
- directory
-
getSchemaDir
Get root directory for schemas.- Returns:
- directory (
nullif root is not a directory)
-
getBindingName
Get binding name.- Returns:
- name (
nullif not set)
-
getUsingNamespace
Get namespace to be used when no schemas with namespaces are being generated.- Returns:
- namespace URI (
nullif unspecified)
-
getCustomRoot
Get customizations model root.- Returns:
- customizations
-
getNonamespacePackage
Get default package for no-namespace schemas.- Returns:
- package (
nullif not set)
-
getModelFile
Get file to be used for dumping generated data model.- Returns:
- dump file (
nullif none)
-
getDifferenceFile
Get file to be used for finding differences in generated data model.- Returns:
- difference file (
nullif none)
-
getIncludePaths
Get the list of paths for bindings to be used for matching schema definitions.- Returns:
- paths (empty if no paths specified)
-
checkParameter
Description copied from class:CustomizationCommandLineBaseCheck extension parameter. This method may be overridden by subclasses to process parameters beyond those known to this base class.- Overrides:
checkParameterin classCustomizationCommandLineBase- Parameters:
alist- argument list- Returns:
trueif parameter processed,falseif unknown
-
finishParameters
Finish processing of command line parameters. This just sets up the schema directory.- Overrides:
finishParametersin classCustomizationCommandLineBase- Parameters:
alist-
-
loadCustomizations
Load the customizations file. This method must load the specified customizations file, or create a default customizations instance, of the appropriate type.- Specified by:
loadCustomizationsin classCustomizationCommandLineBase- Parameters:
path- customization file path- Returns:
trueif successful,falseif an error- Throws:
JiBXExceptionIOException
-
applyOverrides
Description copied from class:CustomizationCommandLineBaseApply map of override values to customizations read from file or created as default.- Specified by:
applyOverridesin classCustomizationCommandLineBase- Parameters:
overmap- override key-value map- Returns:
- map for key/values not recognized
-
printUsage
public void printUsage()Description copied from class:CustomizationCommandLineBasePrint usage information.- Specified by:
printUsagein classCustomizationCommandLineBase
-