Class JacksonReaderGenerator
java.lang.Object
org.codehaus.modello.plugin.AbstractModelloGenerator
org.codehaus.modello.plugin.java.AbstractJavaModelloGenerator
org.codehaus.modello.plugins.xml.AbstractXmlJavaGenerator
org.codehaus.modello.plugin.jackson.AbstractJacksonGenerator
org.codehaus.modello.plugin.jackson.JacksonReaderGenerator
- All Implemented Interfaces:
ModelloGenerator
- Direct Known Subclasses:
JacksonExtendedReaderGenerator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate Stringprivate ModelClassprivate booleanprivate static final Stringprivate ModelClassprivate StringFields inherited from class org.codehaus.modello.plugins.xml.AbstractXmlJavaGenerator
strictXmlAttributesFields inherited from class org.codehaus.modello.plugin.java.AbstractJavaModelloGenerator
DEFAULT_DATE_FORMAT, domAsXpp3 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddTrackingParameters(JMethod method) voidprivate voidprotected booleanprivate voidprocessField(ModelField field, XmlFieldMetadata xmlFieldMetadata, boolean addElse, JSourceCode sc, String objectName, JClass jClass) Generate code to process a field represented as an XML element.private voidwriteAllClassesParser(Model objectModel, JClass jClass) private voidwriteAllClassesReaders(Model objectModel, JClass jClass) private voidwriteClassParser(ModelClass modelClass, JClass jClass, boolean rootElement) private voidwriteClassReaders(ModelClass modelClass, JClass jClass, boolean rootElement) private voidwriteHelpers(JClass jClass) private voidwriteNewLocation(String trackerVariable, JSourceCode sc) private voidwriteNewSetLocation(String key, String objectName, String trackerVariable, JSourceCode sc) private voidwriteNewSetLocation(ModelField field, String objectName, String trackerVariable, JSourceCode sc) private voidwritePrimitiveField(ModelField field, String type, String objectName, String locatorName, String locationKey, String setterName, JSourceCode sc, boolean wrappedItem) private voidwriteSetLocation(String key, String objectName, String trackerVariable, JSourceCode sc) Methods inherited from class org.codehaus.modello.plugins.xml.AbstractXmlJavaGenerator
getContentField, getFieldsForXml, getFileName, getValue, initialize, resolveTagName, resolveTagName, resolveTagName, writeDateParsingHelperMethods inherited from class org.codehaus.modello.plugin.java.AbstractJavaModelloGenerator
addModelImport, addModelImports, getClasses, getDefaultValue, getJavaDefaultValue, getPrefix, getValueChecker, initHeader, initHeader, isJavaEnabled, isRelevant, isTrackingSupport, newJSourceWriter, suppressAllWarningsMethods inherited from class org.codehaus.modello.plugin.AbstractModelloGenerator
capitalise, getBuildContext, getEncoding, getFieldsForClass, getGeneratedHeader, getGeneratedVersion, getHeader, getLicenseHeader, getLogger, getModel, getOutputDirectory, getParameter, isClassInModel, isCollection, isEmpty, isInnerAssociation, isMap, isPackageWithVersion, newWriter, newWriter, requireParameter, singular, uncapitalise
-
Field Details
-
SOURCE_PARAM
- See Also:
-
LOCATION_VAR
- See Also:
-
requiresDomSupport
private boolean requiresDomSupport -
locationTracker
-
locationField
-
sourceTracker
-
trackingArgs
-
-
Constructor Details
-
JacksonReaderGenerator
public JacksonReaderGenerator()
-
-
Method Details
-
isLocationTracking
protected boolean isLocationTracking() -
generate
- Throws:
ModelloException
-
writeAllClassesReaders
-
writeClassReaders
-
generateJacksonReader
- Throws:
ModelloExceptionIOException
-
writeAllClassesParser
-
writeClassParser
-
processField
private void processField(ModelField field, XmlFieldMetadata xmlFieldMetadata, boolean addElse, JSourceCode sc, String objectName, JClass jClass) Generate code to process a field represented as an XML element.- Parameters:
field- the field to processxmlFieldMetadata- its XML metadataaddElse- add anelsestatement before generating a newifsc- the method source code to add toobjectName- the object name in the sourcejClass- the generated class source file
-
writePrimitiveField
private void writePrimitiveField(ModelField field, String type, String objectName, String locatorName, String locationKey, String setterName, JSourceCode sc, boolean wrappedItem) -
writeHelpers
-
addTrackingParameters
-
writeNewSetLocation
private void writeNewSetLocation(ModelField field, String objectName, String trackerVariable, JSourceCode sc) -
writeNewSetLocation
private void writeNewSetLocation(String key, String objectName, String trackerVariable, JSourceCode sc) -
writeNewLocation
-
writeSetLocation
private void writeSetLocation(String key, String objectName, String trackerVariable, JSourceCode sc)
-