Class JavaMarshallingGenerator
- java.lang.Object
-
- org.apache.activemq.openwire.tool.OpenWireGenerator
-
- org.apache.activemq.openwire.tool.MultiSourceGenerator
-
- org.apache.activemq.openwire.tool.JavaMarshallingGenerator
-
- Direct Known Subclasses:
CppMarshallingHeadersGenerator
,CSharpMarshallingGenerator
public class JavaMarshallingGenerator extends MultiSourceGenerator
-
-
Field Summary
Fields Modifier and Type Field Description protected List<org.codehaus.jam.JClass>
concreteClasses
protected File
factoryFile
protected String
factoryFileName
protected String
indent
protected String
targetDir
-
Fields inherited from class org.apache.activemq.openwire.tool.MultiSourceGenerator
baseClass, buffer, className, destDir, destFile, jclass, manuallyMaintainedClasses, simpleName, superclass
-
Fields inherited from class org.apache.activemq.openwire.tool.OpenWireGenerator
filePostFix, jam, openwireVersion
-
-
Constructor Summary
Constructors Constructor Description JavaMarshallingGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
generateFactory(PrintWriter out)
protected void
generateFile(PrintWriter out)
protected void
generateLooseMarshalBody(PrintWriter out)
protected void
generateLooseUnmarshalBody(PrintWriter out)
protected void
generateLooseUnmarshalBodyForArrayProperty(PrintWriter out, org.codehaus.jam.JProperty property, org.codehaus.jam.JAnnotationValue size)
protected void
generateLooseUnmarshalBodyForProperty(PrintWriter out, org.codehaus.jam.JProperty property, org.codehaus.jam.JAnnotationValue size)
protected int
generateTightMarshal1Body(PrintWriter out)
protected void
generateTightMarshal2Body(PrintWriter out)
protected void
generateTightUnmarshalBody(PrintWriter out)
protected void
generateTightUnmarshalBodyForArrayProperty(PrintWriter out, org.codehaus.jam.JProperty property, org.codehaus.jam.JAnnotationValue size)
protected void
generateTightUnmarshalBodyForProperty(PrintWriter out, org.codehaus.jam.JProperty property, org.codehaus.jam.JAnnotationValue size)
protected String
getBaseClassName(org.codehaus.jam.JClass jclass)
protected String
getClassName(org.codehaus.jam.JClass jclass)
List<org.codehaus.jam.JClass>
getConcreteClasses()
File
getFactoryFile()
String
getFactoryFileName()
String
getIndent()
protected String
getMandatoryFlag(org.codehaus.jam.JAnnotation annotation)
Returns whether or not the given annotation has a mandatory flag on it or notString
getTargetDir()
protected void
initialiseManuallyMaintainedClasses()
protected void
processClass(org.codehaus.jam.JClass jclass)
protected void
processFactory()
Object
run()
void
setConcreteClasses(List<org.codehaus.jam.JClass> concreteClasses)
void
setFactoryFile(File factoryFile)
void
setFactoryFileName(String factoryFileName)
void
setIndent(String indent)
void
setTargetDir(String sourceDir)
-
Methods inherited from class org.apache.activemq.openwire.tool.MultiSourceGenerator
getAbstractClassText, getBaseClass, getClassName, getDestDir, getDestFile, getJclass, getManuallyMaintainedClasses, getProperties, getSimpleName, getSuperclass, isAbstractClass, isMarshallerAware, isValidClass, setBaseClass, setClassName, setDestDir, setDestFile, setJclass, setManuallyMaintainedClasses, setSimpleName, setSuperclass
-
Methods inherited from class org.apache.activemq.openwire.tool.OpenWireGenerator
capitalize, decapitalize, getClasses, getJam, getOpenWireOpCode, getOpenwireVersion, isAbstract, isCachedProperty, isMarshallAware, isThrowable, isValidProperty, setJam, setOpenwireVersion, stringValue, stringValue, toCSharpType
-
-
-
-
Method Detail
-
run
public Object run()
- Overrides:
run
in classMultiSourceGenerator
-
generateFile
protected void generateFile(PrintWriter out) throws Exception
- Specified by:
generateFile
in classMultiSourceGenerator
- Throws:
Exception
-
processFactory
protected void processFactory()
-
generateFactory
protected void generateFactory(PrintWriter out)
-
processClass
protected void processClass(org.codehaus.jam.JClass jclass)
- Overrides:
processClass
in classMultiSourceGenerator
-
getClassName
protected String getClassName(org.codehaus.jam.JClass jclass)
- Overrides:
getClassName
in classMultiSourceGenerator
-
getBaseClassName
protected String getBaseClassName(org.codehaus.jam.JClass jclass)
- Overrides:
getBaseClassName
in classMultiSourceGenerator
-
initialiseManuallyMaintainedClasses
protected void initialiseManuallyMaintainedClasses()
- Overrides:
initialiseManuallyMaintainedClasses
in classMultiSourceGenerator
-
generateTightUnmarshalBody
protected void generateTightUnmarshalBody(PrintWriter out)
-
generateTightUnmarshalBodyForProperty
protected void generateTightUnmarshalBodyForProperty(PrintWriter out, org.codehaus.jam.JProperty property, org.codehaus.jam.JAnnotationValue size)
-
generateTightUnmarshalBodyForArrayProperty
protected void generateTightUnmarshalBodyForArrayProperty(PrintWriter out, org.codehaus.jam.JProperty property, org.codehaus.jam.JAnnotationValue size)
-
generateTightMarshal1Body
protected int generateTightMarshal1Body(PrintWriter out)
-
generateTightMarshal2Body
protected void generateTightMarshal2Body(PrintWriter out)
-
generateLooseMarshalBody
protected void generateLooseMarshalBody(PrintWriter out)
-
generateLooseUnmarshalBody
protected void generateLooseUnmarshalBody(PrintWriter out)
-
generateLooseUnmarshalBodyForProperty
protected void generateLooseUnmarshalBodyForProperty(PrintWriter out, org.codehaus.jam.JProperty property, org.codehaus.jam.JAnnotationValue size)
-
generateLooseUnmarshalBodyForArrayProperty
protected void generateLooseUnmarshalBodyForArrayProperty(PrintWriter out, org.codehaus.jam.JProperty property, org.codehaus.jam.JAnnotationValue size)
-
getMandatoryFlag
protected String getMandatoryFlag(org.codehaus.jam.JAnnotation annotation)
Returns whether or not the given annotation has a mandatory flag on it or not
-
getConcreteClasses
public List<org.codehaus.jam.JClass> getConcreteClasses()
-
setConcreteClasses
public void setConcreteClasses(List<org.codehaus.jam.JClass> concreteClasses)
-
getFactoryFile
public File getFactoryFile()
-
setFactoryFile
public void setFactoryFile(File factoryFile)
-
getFactoryFileName
public String getFactoryFileName()
-
setFactoryFileName
public void setFactoryFileName(String factoryFileName)
-
getIndent
public String getIndent()
-
setIndent
public void setIndent(String indent)
-
getTargetDir
public String getTargetDir()
-
setTargetDir
public void setTargetDir(String sourceDir)
-
-