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


Field Summary
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
JavaMarshallingGenerator()
           
 
Method Summary
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 not
 String 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

concreteClasses

protected List<org.codehaus.jam.JClass> concreteClasses

factoryFile

protected File factoryFile

factoryFileName

protected String factoryFileName

indent

protected String indent

targetDir

protected String targetDir
Constructor Detail

JavaMarshallingGenerator

public JavaMarshallingGenerator()
Method Detail

run

public Object run()
Overrides:
run in class MultiSourceGenerator

generateFile

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

processFactory

protected void processFactory()

generateFactory

protected void generateFactory(PrintWriter out)

processClass

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

getClassName

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

getBaseClassName

protected 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(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)


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.