|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.sandev.generator.GeneratorCommon
org.sandev.generator.AggregateGeneratorBase
org.sandev.generator.AggregateMappedGeneratorBase
public class AggregateMappedGeneratorBase
Base class for generators creating a single aggregate file using a StructMapper. This base class loads the StructMapper declared in the build or the default mapper if a valid mapper class was not specified.
| Field Summary | |
|---|---|
protected org.sandev.generator.StructMapper |
structmap
The mappings we are using. |
protected java.lang.String |
structPrefix
The prefix to be applied to all mapped struct names. |
| Fields inherited from class org.sandev.generator.AggregateGeneratorBase |
|---|
extra |
| Fields inherited from class org.sandev.generator.GeneratorCommon |
|---|
CONTEXT_CONFIGURATION, CONTEXT_CONTROL, CONTEXT_FRAMEWORK, CONTEXT_MESSAGING, CONTEXT_PERSISTENCE, CONTEXT_UI, DEFAULT_LINE_LENGTH, MESSAGE_INTERFACES |
| Constructor Summary | |
|---|---|
AggregateMappedGeneratorBase()
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
getMappedFieldName(com.sun.javadoc.ClassDoc struct,
com.sun.javadoc.FieldDoc field)
Returns the mapped name for the field. |
protected java.lang.String |
getMappedFieldRelation(com.sun.javadoc.ClassDoc struct,
com.sun.javadoc.FieldDoc field)
Returns the mapped name for the relationship between the struct and the reference array field values. |
protected java.lang.String |
getMappedFieldRelationChild(com.sun.javadoc.ClassDoc struct,
com.sun.javadoc.FieldDoc field)
In the relation between the struct and the reference array field values, return the name of the field representing the array field value. |
protected java.lang.String |
getMappedFieldRelationIndex(com.sun.javadoc.ClassDoc struct,
com.sun.javadoc.FieldDoc field)
In the relation between the struct and the reference array field values, return the name of the field representing the ordering information for the array values. |
protected java.lang.String |
getMappedFieldRelationParent(com.sun.javadoc.ClassDoc struct,
com.sun.javadoc.FieldDoc field)
In the relation between the struct and the reference array field values, return the name of the field representing the struct instance. |
protected java.lang.String |
getMappedFieldType(com.sun.javadoc.ClassDoc struct,
com.sun.javadoc.FieldDoc field)
Returns the mapped type for the field. |
protected java.lang.String |
getMappedStructName(com.sun.javadoc.ClassDoc struct)
Return the mapped struct name. |
protected java.lang.String |
getMappedStructName(com.sun.javadoc.ClassDoc struct,
com.sun.javadoc.ClassDoc[] path)
Return the mapped struct name, using the next level down in the given path if it the struct is abstract. |
protected void |
loadStructMapper()
Load our structmap sandpersist declaration. |
protected org.sandev.generator.StructMapper |
loadStructMapper(java.lang.String mapname)
Return a new instance of the specified StructMapper if possible. |
| Methods inherited from class org.sandev.generator.AggregateGeneratorBase |
|---|
addSandAttrValToDecls, cleanup, cleanupSecondaryFiles, generate, getExtra, getFileSpec, setExtra, writeFile, writeSecondaryFiles |
| Methods inherited from class org.sandev.generator.GeneratorCommon |
|---|
capitalize, copyfile, deletefile, filterHTMLLine, findStructDeclByShortname, getDeclaredFields, getFields, getInheritanceHierarchy, getLastAppProject, getLastUtilDir, getLongInstanceName, getPrintStream, getSandProject, getShortInstanceName, getUtilPackage, getVisibleFields, hasSubStructs, isArray, isBasic, isLongReferenceArray, isMessageInterface, isParentAbstract, isPrimitive, isRootStruct, isVowel, log, nextToken, pluralize, rangeEscape, removePlatformDecls, trackFileDelete, trackFileWrite, uncapitalize, writeDefaultCtor, writeDescription, writeHTMLContents, writeMessageImports, writeSectionName, writeStandardCommentID, writeXHTMLFooter, writeXHTMLFooter, writeXHTMLHeader, writeXHTMLHeader |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.sandev.sandbuild.SandGenerator |
|---|
cleanup, generate |
| Field Detail |
|---|
protected org.sandev.generator.StructMapper structmap
protected java.lang.String structPrefix
| Constructor Detail |
|---|
public AggregateMappedGeneratorBase()
| Method Detail |
|---|
protected void loadStructMapper()
throws org.sandev.sandbuild.SandGeneratorException
In the absence of an explicit declaration, log a warning and load the default. Using the default is fine, but it's much clearer if the deployment declares that explicitly. That way if the default gets used when it shouldn't be, the build log will show what happened.
org.sandev.sandbuild.SandGeneratorException
protected org.sandev.generator.StructMapper loadStructMapper(java.lang.String mapname)
throws org.sandev.sandbuild.SandGeneratorException
org.sandev.sandbuild.SandGeneratorExceptionprotected java.lang.String getMappedStructName(com.sun.javadoc.ClassDoc struct)
protected java.lang.String getMappedStructName(com.sun.javadoc.ClassDoc struct,
com.sun.javadoc.ClassDoc[] path)
protected java.lang.String getMappedFieldName(com.sun.javadoc.ClassDoc struct,
com.sun.javadoc.FieldDoc field)
protected java.lang.String getMappedFieldType(com.sun.javadoc.ClassDoc struct,
com.sun.javadoc.FieldDoc field)
protected java.lang.String getMappedFieldRelation(com.sun.javadoc.ClassDoc struct,
com.sun.javadoc.FieldDoc field)
protected java.lang.String getMappedFieldRelationParent(com.sun.javadoc.ClassDoc struct,
com.sun.javadoc.FieldDoc field)
protected java.lang.String getMappedFieldRelationChild(com.sun.javadoc.ClassDoc struct,
com.sun.javadoc.FieldDoc field)
protected java.lang.String getMappedFieldRelationIndex(com.sun.javadoc.ClassDoc struct,
com.sun.javadoc.FieldDoc field)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||