com.envoisolutions.sxc.builder.impl
Class AbstractWriterBuilder

java.lang.Object
  extended by com.envoisolutions.sxc.builder.impl.AbstractWriterBuilder
All Implemented Interfaces:
WriterBuilder
Direct Known Subclasses:
AttributeWriterBuilder, ElementWriterBuilderImpl

public abstract class AbstractWriterBuilder
extends java.lang.Object
implements WriterBuilder


Field Summary
protected  BuildContext buildContext
           
protected  com.sun.codemodel.JBlock currentBlock
           
protected  java.util.List<java.lang.Class> exceptions
           
protected  com.sun.codemodel.JMethod method
           
protected  com.sun.codemodel.JCodeModel model
           
protected  javax.xml.namespace.QName name
           
protected  com.sun.codemodel.JVar objectVar
           
protected  ElementWriterBuilderImpl parent
           
protected  com.sun.codemodel.JVar rtContextVar
           
protected  IdentityManager variableManager
           
protected  com.sun.codemodel.JDefinedClass writerClass
           
protected  com.sun.codemodel.JVar xswVar
           
 
Constructor Summary
AbstractWriterBuilder()
           
 
Method Summary
protected  com.sun.codemodel.JVar addBasicArgs(com.sun.codemodel.JMethod method, com.sun.codemodel.JType sourceObjectType, java.lang.String sourceVariableName)
           
 void declareException(java.lang.Class cls)
           
 com.sun.codemodel.JCodeModel getCodeModel()
           
 com.sun.codemodel.JVar getContextVar()
           
 com.sun.codemodel.JBlock getCurrentBlock()
           
protected  java.lang.String getGetter(java.lang.String name)
           
 com.sun.codemodel.JMethod getMethod()
           
 javax.xml.namespace.QName getName()
           
 com.sun.codemodel.JVar getObject()
          Get the current object being written.
 WriterBuilder getParent()
           
 IdentityManager getVariableManager()
           
 com.sun.codemodel.JDefinedClass getWriterClass()
           
 com.sun.codemodel.JVar getXSW()
          Get the XMLStreamWriter.
 void moveTo(WriterBuilder builder)
          Call another Method which is represented by this WriterBuilder.
 void setCurrentBlock(com.sun.codemodel.JBlock currentBlock)
           
 void setObject(com.sun.codemodel.JVar var)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.envoisolutions.sxc.builder.WriterBuilder
writeAs
 

Field Detail

buildContext

protected BuildContext buildContext

model

protected com.sun.codemodel.JCodeModel model

writerClass

protected com.sun.codemodel.JDefinedClass writerClass

method

protected com.sun.codemodel.JMethod method

xswVar

protected com.sun.codemodel.JVar xswVar

rtContextVar

protected com.sun.codemodel.JVar rtContextVar

objectVar

protected com.sun.codemodel.JVar objectVar

currentBlock

protected com.sun.codemodel.JBlock currentBlock

parent

protected ElementWriterBuilderImpl parent

name

protected javax.xml.namespace.QName name

exceptions

protected java.util.List<java.lang.Class> exceptions

variableManager

protected final IdentityManager variableManager
Constructor Detail

AbstractWriterBuilder

public AbstractWriterBuilder()
Method Detail

declareException

public void declareException(java.lang.Class cls)
Specified by:
declareException in interface WriterBuilder

addBasicArgs

protected com.sun.codemodel.JVar addBasicArgs(com.sun.codemodel.JMethod method,
                                              com.sun.codemodel.JType sourceObjectType,
                                              java.lang.String sourceVariableName)

getCodeModel

public com.sun.codemodel.JCodeModel getCodeModel()
Specified by:
getCodeModel in interface WriterBuilder

moveTo

public void moveTo(WriterBuilder builder)
Description copied from interface: WriterBuilder
Call another Method which is represented by this WriterBuilder.

Specified by:
moveTo in interface WriterBuilder

getGetter

protected java.lang.String getGetter(java.lang.String name)

getObject

public com.sun.codemodel.JVar getObject()
Description copied from interface: WriterBuilder
Get the current object being written.

Specified by:
getObject in interface WriterBuilder
Returns:

setObject

public void setObject(com.sun.codemodel.JVar var)

getXSW

public com.sun.codemodel.JVar getXSW()
Description copied from interface: WriterBuilder
Get the XMLStreamWriter.

Specified by:
getXSW in interface WriterBuilder
Returns:

getContextVar

public com.sun.codemodel.JVar getContextVar()

getMethod

public com.sun.codemodel.JMethod getMethod()

getWriterClass

public com.sun.codemodel.JDefinedClass getWriterClass()
Specified by:
getWriterClass in interface WriterBuilder

getCurrentBlock

public com.sun.codemodel.JBlock getCurrentBlock()
Specified by:
getCurrentBlock in interface WriterBuilder

setCurrentBlock

public void setCurrentBlock(com.sun.codemodel.JBlock currentBlock)
Specified by:
setCurrentBlock in interface WriterBuilder

getName

public javax.xml.namespace.QName getName()
Specified by:
getName in interface WriterBuilder

getParent

public WriterBuilder getParent()
Specified by:
getParent in interface WriterBuilder

getVariableManager

public IdentityManager getVariableManager()
Specified by:
getVariableManager in interface WriterBuilder


Copyright © 2007-2008 Envoi Solutions LLC. All Rights Reserved.