com.sun.tools.xjc.generator.bean.field

Class DummyListField

public class DummyListField extends AbstractListField

Realizes a property as an untyped List.
 List getXXX();
 

Default value handling

Since unmarshaller just adds new values into the storage, we can't fill the storage by default values at the time of instanciation. (or oherwise values found in the document will be appended to default values, where it should overwrite them.)

Therefore, when the object is created, the storage will be empty. When the getXXX method is called, we'll check if the storage is modified in anyway. If it is modified, it must mean that the values are found in the document, so we just return it. Otherwise we will fill in default values and return it to the user.

When a list has default values, its dirty flag is set to true. Marshaller will check this and treat it appropriately.

Nested Class Summary
classDummyListField.Accessor
Constructor Summary
protected DummyListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList)
Method Summary
voidannotate(JAnnotatable field)
Annotate the field according to the recipes given as CPropertyInfo.
DummyListField.Accessorcreate(JExpression targetObject)
voidgenerateAccessors()
protected JClassgetCoreListType()

Constructor Detail

DummyListField

protected DummyListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList)

Parameters: coreList A concrete class that implements the List interface. An instance of this class will be used to store data for this field.

Method Detail

annotate

void annotate(JAnnotatable field)
Annotate the field according to the recipes given as CPropertyInfo.

create

public DummyListField.Accessor create(JExpression targetObject)

generateAccessors

void generateAccessors()

getCoreListType

protected final JClass getCoreListType()