Package org.jibx.custom.classes
Class ClassCustomizationBase
- java.lang.Object
-
- org.jibx.custom.CustomizationCommandLineBase
-
- org.jibx.custom.classes.ClassCustomizationBase
-
- Direct Known Subclasses:
SchemaGenCommandLine
public abstract class ClassCustomizationBase extends CustomizationCommandLineBase
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
Fields Modifier and Type Field Description private static java.lang.String[]BASE_USAGE_LINESOrdered array of usage lines.private java.util.Listm_classPathsList of class paths.private java.util.Listm_sourcePathsList of source paths.-
Fields inherited from class org.jibx.custom.CustomizationCommandLineBase
STRING_PARAMETER_ARRAY, STRING_UNMARSHALLER_PARAMETER_ARRAY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedClassCustomizationBase(java.lang.String[] lines)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleancheckParameter(CustomizationCommandLineBase.ArgList alist)Check if an extension parameter is recognized.protected voidfinishParameters(CustomizationCommandLineBase.ArgList alist)Finish processing of command line parameters.protected booleanloadCustomizations(java.lang.String path)Load the customizations file.protected abstract voidloadCustomizations(java.lang.String path, IClassLocator loc, ValidationContext vctx)Load the customizations file.protected static voidsplitItems(java.lang.String text, java.util.List values)Split items from a comma-delimited list.protected voidverboseDetails()Print any extension details.-
Methods inherited from class org.jibx.custom.CustomizationCommandLineBase
applyOverrides, getExtraArgs, getGeneratePath, getUsageLines, isVerbose, mergeUsageLines, printUsage, processArgs, putKeyValue
-
-
-
-
Method Detail
-
splitItems
protected static void splitItems(java.lang.String text, java.util.List values)Split items from a comma-delimited list.- Parameters:
text- comma-delimited listvalues- target list of item values
-
checkParameter
protected boolean checkParameter(CustomizationCommandLineBase.ArgList alist)
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:
checkParameterin classCustomizationCommandLineBase- Parameters:
alist- argument list- Returns:
trueif parameter processed,falseif unknown
-
finishParameters
protected void finishParameters(CustomizationCommandLineBase.ArgList alist)
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:
finishParametersin 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:
verboseDetailsin classCustomizationCommandLineBase
-
loadCustomizations
protected boolean loadCustomizations(java.lang.String path) throws JiBXException, java.io.IOExceptionLoad 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:
JiBXExceptionjava.io.IOException
-
loadCustomizations
protected abstract void loadCustomizations(java.lang.String path, IClassLocator loc, ValidationContext vctx) throws JiBXException, java.io.IOExceptionLoad 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,nullif noneloc- class locatorvctx- validation context- Throws:
JiBXExceptionjava.io.IOException
-
-