org.apache.activemq.openwire.tool
Class JavaMarshallingGenerator

java.lang.Object
  extended by org.apache.activemq.openwire.tool.OpenWireGenerator
      extended by org.apache.activemq.openwire.tool.MultiSourceGenerator
          extended by org.apache.activemq.openwire.tool.JavaMarshallingGenerator
Direct Known Subclasses:
CppMarshallingHeadersGenerator, CSharpMarshallingGenerator

public class JavaMarshallingGenerator
extends MultiSourceGenerator

Version:
$Revision: 384826 $

Field Summary
protected  java.util.List concreteClasses
           
protected  java.io.File factoryFile
           
protected  java.lang.String factoryFileName
           
protected  java.lang.String indent
           
protected  java.lang.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
JavaMarshallingGenerator()
           
 
Method Summary
protected  void generateFactory(java.io.PrintWriter out)
           
protected  void generateFile(java.io.PrintWriter out)
           
protected  void generateLooseMarshalBody(java.io.PrintWriter out)
           
protected  void generateLooseUnmarshalBody(java.io.PrintWriter out)
           
protected  void generateLooseUnmarshalBodyForArrayProperty(java.io.PrintWriter out, org.codehaus.jam.JProperty property, org.codehaus.jam.JAnnotationValue size)
           
protected  void generateLooseUnmarshalBodyForProperty(java.io.PrintWriter out, org.codehaus.jam.JProperty property, org.codehaus.jam.JAnnotationValue size)
           
protected  int generateTightMarshal1Body(java.io.PrintWriter out)
           
protected  void generateTightMarshal2Body(java.io.PrintWriter out)
           
protected  void generateTightUnmarshalBody(java.io.PrintWriter out)
           
protected  void generateTightUnmarshalBodyForArrayProperty(java.io.PrintWriter out, org.codehaus.jam.JProperty property, org.codehaus.jam.JAnnotationValue size)
           
protected  void generateTightUnmarshalBodyForProperty(java.io.PrintWriter out, org.codehaus.jam.JProperty property, org.codehaus.jam.JAnnotationValue size)
           
protected  java.lang.String getBaseClassName(org.codehaus.jam.JClass jclass)
           
protected  java.lang.String getClassName(org.codehaus.jam.JClass jclass)
           
 java.util.List getConcreteClasses()
           
 java.io.File getFactoryFile()
           
 java.lang.String getFactoryFileName()
           
 java.lang.String getIndent()
           
protected  java.lang.String getMandatoryFlag(org.codehaus.jam.JAnnotation annotation)
          Returns whether or not the given annotation has a mandatory flag on it or not
 java.lang.String getTargetDir()
           
protected  void initialiseManuallyMaintainedClasses()
           
protected  void processClass(org.codehaus.jam.JClass jclass)
           
protected  void processFactory()
           
 java.lang.Object run()
           
 void setConcreteClasses(java.util.List concreteClasses)
           
 void setFactoryFile(java.io.File factoryFile)
           
 void setFactoryFileName(java.lang.String factoryFileName)
           
 void setIndent(java.lang.String indent)
           
 void setTargetDir(java.lang.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

concreteClasses

protected java.util.List concreteClasses

factoryFile

protected java.io.File factoryFile

factoryFileName

protected java.lang.String factoryFileName

indent

protected java.lang.String indent

targetDir

protected java.lang.String targetDir
Constructor Detail

JavaMarshallingGenerator

public JavaMarshallingGenerator()
Method Detail

run

public java.lang.Object run()
Overrides:
run in class MultiSourceGenerator

generateFile

protected void generateFile(java.io.PrintWriter out)
                     throws java.lang.Exception
Specified by:
generateFile in class MultiSourceGenerator
Throws:
java.lang.Exception

processFactory

protected void processFactory()

generateFactory

protected void generateFactory(java.io.PrintWriter out)

processClass

protected void processClass(org.codehaus.jam.JClass jclass)
Overrides:
processClass in class MultiSourceGenerator

getClassName

protected java.lang.String getClassName(org.codehaus.jam.JClass jclass)
Overrides:
getClassName in class MultiSourceGenerator

getBaseClassName

protected java.lang.String getBaseClassName(org.codehaus.jam.JClass jclass)
Overrides:
getBaseClassName in class MultiSourceGenerator

initialiseManuallyMaintainedClasses

protected void initialiseManuallyMaintainedClasses()
Overrides:
initialiseManuallyMaintainedClasses in class MultiSourceGenerator

generateTightUnmarshalBody

protected void generateTightUnmarshalBody(java.io.PrintWriter out)

generateTightUnmarshalBodyForProperty

protected void generateTightUnmarshalBodyForProperty(java.io.PrintWriter out,
                                                     org.codehaus.jam.JProperty property,
                                                     org.codehaus.jam.JAnnotationValue size)

generateTightUnmarshalBodyForArrayProperty

protected void generateTightUnmarshalBodyForArrayProperty(java.io.PrintWriter out,
                                                          org.codehaus.jam.JProperty property,
                                                          org.codehaus.jam.JAnnotationValue size)

generateTightMarshal1Body

protected int generateTightMarshal1Body(java.io.PrintWriter out)

generateTightMarshal2Body

protected void generateTightMarshal2Body(java.io.PrintWriter out)

generateLooseMarshalBody

protected void generateLooseMarshalBody(java.io.PrintWriter out)

generateLooseUnmarshalBody

protected void generateLooseUnmarshalBody(java.io.PrintWriter out)

generateLooseUnmarshalBodyForProperty

protected void generateLooseUnmarshalBodyForProperty(java.io.PrintWriter out,
                                                     org.codehaus.jam.JProperty property,
                                                     org.codehaus.jam.JAnnotationValue size)

generateLooseUnmarshalBodyForArrayProperty

protected void generateLooseUnmarshalBodyForArrayProperty(java.io.PrintWriter out,
                                                          org.codehaus.jam.JProperty property,
                                                          org.codehaus.jam.JAnnotationValue size)

getMandatoryFlag

protected java.lang.String getMandatoryFlag(org.codehaus.jam.JAnnotation annotation)
Returns whether or not the given annotation has a mandatory flag on it or not


getConcreteClasses

public java.util.List getConcreteClasses()

setConcreteClasses

public void setConcreteClasses(java.util.List concreteClasses)

getFactoryFile

public java.io.File getFactoryFile()

setFactoryFile

public void setFactoryFile(java.io.File factoryFile)

getFactoryFileName

public java.lang.String getFactoryFileName()

setFactoryFileName

public void setFactoryFileName(java.lang.String factoryFileName)

getIndent

public java.lang.String getIndent()

setIndent

public void setIndent(java.lang.String indent)

getTargetDir

public java.lang.String getTargetDir()

setTargetDir

public void setTargetDir(java.lang.String sourceDir)


Copyright © 2010 Apache Software Foundation. All Rights Reserved.