com.sun.tools.xjc.generator.marshaller
Interface FieldMarshallerGenerator


public interface FieldMarshallerGenerator

Generates marshalling code for a particular field


Method Summary
 FieldMarshallerGenerator clone(com.sun.codemodel.JBlock block, java.lang.String uniqueId)
          Creates a clone of the iterator into the given code block by using a given unique id, then return a FieldMarshallerGenerator that manipulates the cloned iterator.
 com.sun.codemodel.JExpression hasMore()
          Returns an expression that evaulates to the boolean value that indicates this field still has a value to be marshalled.
 void increment(com.sun.tools.xjc.generator.util.BlockReference block)
          Just increment the pointer.
 com.sun.tools.xjc.generator.field.FieldRenderer owner()
          Returns a Field object that created this generator.
 com.sun.codemodel.JExpression peek(boolean increment)
          Returns an expression that evaluates to the next object to be marshalled.
 

Method Detail

owner

com.sun.tools.xjc.generator.field.FieldRenderer owner()
Returns a Field object that created this generator.


peek

com.sun.codemodel.JExpression peek(boolean increment)
Returns an expression that evaluates to the next object to be marshalled.

In general, the type of the returned expression can be more general than the specific context requires. For example, it could be "java.lang.Object", or if the field is union of A and B, it could be the common type between A and B.

The caller is thus responsible for casting the result to a proper sub-type. This is because a field cannot know the exact type that the context requires. (this happens when the field is union.)

Parameters:
increment - If true, "the pointer" is incremented to point the next object in this field.

increment

void increment(com.sun.tools.xjc.generator.util.BlockReference block)
Just increment the pointer.


hasMore

com.sun.codemodel.JExpression hasMore()
Returns an expression that evaulates to the boolean value that indicates this field still has a value to be marshalled.


clone

FieldMarshallerGenerator clone(com.sun.codemodel.JBlock block,
                               java.lang.String uniqueId)
Creates a clone of the iterator into the given code block by using a given unique id, then return a FieldMarshallerGenerator that manipulates the cloned iterator.