Package org.jibx.custom.classes
Class ClassCustomizationBase
java.lang.Object
org.jibx.custom.CustomizationCommandLineBase
org.jibx.custom.classes.ClassCustomizationBase
- Direct Known Subclasses:
SchemaGenCommandLine
Command line processor for customizable tools working with Java classes.
- 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 usage lines.private List
List of class paths.private List
List of source paths.Fields inherited from class org.jibx.custom.CustomizationCommandLineBase
STRING_PARAMETER_ARRAY, STRING_UNMARSHALLER_PARAMETER_ARRAY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Check if an extension parameter is recognized.protected void
Finish processing of command line parameters.protected boolean
loadCustomizations
(String path) Load the customizations file.protected abstract void
loadCustomizations
(String path, IClassLocator loc, ValidationContext vctx) Load the customizations file.protected static void
splitItems
(String text, List values) Split items from a comma-delimited list.protected void
Print any extension details.Methods inherited from class org.jibx.custom.CustomizationCommandLineBase
applyOverrides, getExtraArgs, getGeneratePath, getUsageLines, isVerbose, mergeUsageLines, printUsage, processArgs, putKeyValue
-
Field Details
-
BASE_USAGE_LINES
Ordered array of usage lines. -
m_classPaths
List of class paths. -
m_sourcePaths
List of source paths.
-
-
Constructor Details
-
ClassCustomizationBase
Constructor.- Parameters:
lines
-
-
-
Method Details
-
splitItems
Split items from a comma-delimited list.- Parameters:
text
- comma-delimited listvalues
- target list of item values
-
checkParameter
Check if an extension parameter is recognized. Subclasses which override this method should call the base class method before doing their own checks, and only perform their own checks if this method returnsfalse
..- Overrides:
checkParameter
in classCustomizationCommandLineBase
- Parameters:
alist
- argument list- Returns:
true
if parameter processed,false
if unknown
-
finishParameters
Finish processing of command line parameters. This adds the JVM classpath directories to the set of paths specified on the command line. Subclasses which override this method need to call this base class implementation as part of their processing.- Overrides:
finishParameters
in classCustomizationCommandLineBase
- Parameters:
alist
-
-
verboseDetails
protected void verboseDetails()Print any extension details. This method may be overridden by subclasses to print extension parameter values for verbose output, but the base class implementation should be called first.- Overrides:
verboseDetails
in classCustomizationCommandLineBase
-
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:
loadCustomizations
in classCustomizationCommandLineBase
- Parameters:
path
- customization file path- Returns:
true
if successful,false
if an error- Throws:
JiBXException
IOException
-
loadCustomizations
protected abstract void loadCustomizations(String path, IClassLocator loc, ValidationContext vctx) throws JiBXException, IOException Load the customizations file. This method must load the specified customizations file, or create a default customizations instance, of the appropriate type.- Parameters:
path
- customizations file path,null
if noneloc
- class locatorvctx
- validation context- Throws:
JiBXException
IOException
-