Top Description Inners Fields Constructors Methods
com.sun.tools.xjc.generator.bean.field

public Class NoExtendedContentField

extends AbstractListField
Class Inheritance
Imports
java.util.ArrayList, .List, .Set, com.sun.codemodel.JBlock, .JClass, .JExpr, .JExpression, .JMethod, .JType, .JVar, com.sun.tools.xjc.generator.bean.ClassOutlineImpl, .MethodWriter, com.sun.tools.xjc.model.CElement, .CPropertyInfo, .CReferencePropertyInfo, com.sun.tools.xjc.outline.Aspect, .FieldAccessor, org.glassfish.jaxb.core.api.impl.NameConverter, java.io.Serializable

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.

Author
Kohsuke Kawaguchi ([email protected])

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
private JMethod
$get

List getFIELD() method.

private final JClass
coreList

A concrete class that implements the List interface.

Inherited from com.sun.tools.xjc.generator.bean.field.AbstractListField:
fieldlistTprimitiveType

Constructor Summary

AccessConstructor and Description
protected
NoExtendedContentField(ClassOutlineImpl context, CPropertyInfo prop, JClass
A concrete class that implements the List interface. An instance of this class will be used to store data for this field.
coreList
)

Method Summary

Modifier and TypeMethod and Description
public FieldAccessor
create(JExpression targetObject)

Implements com.sun.tools.xjc.outline.FieldOutline.create.

Creates a new FieldAccessor of this field for the specified object.

public void
protected final JClass
getCoreListType()

Implements abstract com.sun.tools.xjc.generator.bean.field.AbstractListField.getCoreListType.

Concrete class that implements the List interface.

protected JType
Inherited from com.sun.tools.xjc.generator.bean.field.AbstractListField:
appendJavadocfixNullRefgenerategetRawType

Field Detail

$getback to summary
private JMethod $get

List getFIELD() method.

coreListback to summary
private final JClass coreList

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

Constructor Detail

NoExtendedContentFieldback to summary
protected NoExtendedContentField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList)
Parameters
coreList:JClass

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

Method Detail

createback to summary
public FieldAccessor create(JExpression targetObject)

Implements com.sun.tools.xjc.outline.FieldOutline.create.

Doc from com.sun.tools.xjc.outline.FieldOutline.create.

Creates a new FieldAccessor of this field for the specified object.

Annotations
@Override
generateAccessorsback to summary
public void generateAccessors()

Implements abstract com.sun.tools.xjc.generator.bean.field.AbstractListField.generateAccessors.

Doc from com.sun.tools.xjc.generator.bean.field.AbstractListField.generateAccessors.

Generates accessor methods.

Annotations
@Override
getCoreListTypeback to summary
protected final JClass getCoreListType()

Implements abstract com.sun.tools.xjc.generator.bean.field.AbstractListField.getCoreListType.

Doc from com.sun.tools.xjc.generator.bean.field.AbstractListField.getCoreListType.

Concrete class that implements the List interface. Used as the actual data storage.

Annotations
@Override
getTypeback to summary
protected JType getType(final Aspect aspect)

Overrides com.sun.tools.xjc.generator.bean.field.AbstractField.getType.

Doc from com.sun.tools.xjc.generator.bean.field.AbstractField.getType.

Compute the type of a CPropertyInfo

Annotations
@Override
com.sun.tools.xjc.generator.bean.field back to summary

pack-priv Class NoExtendedContentField.Accessor

extends Accessor
Class Inheritance

Field Summary

Inherited from com.sun.tools.xjc.generator.bean.field.AbstractListField.Accessor:
field

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public void
fromRawValue(JBlock block, String uniqueName, JExpression $var)

Implements com.sun.tools.xjc.outline.FieldAccessor.fromRawValue.

Sets the value of the field from the specified expression.

public void
toRawValue(JBlock block, JVar $var)

Implements com.sun.tools.xjc.outline.FieldAccessor.toRawValue.

Dumps everything in this field into the given variable.

Inherited from com.sun.tools.xjc.generator.bean.field.AbstractListField.Accessor:
boxcounthasSetValuerefunboxunsetValues

Constructor Detail

Accessorback to summary
protected Accessor(JExpression $target)

Method Detail

fromRawValueback to summary
public void fromRawValue(JBlock block, String uniqueName, JExpression $var)

Implements com.sun.tools.xjc.outline.FieldAccessor.fromRawValue.

Doc from com.sun.tools.xjc.outline.FieldAccessor.fromRawValue.

Sets the value of the field from the specified expression.

This generates code that accesses the field from outside.

Annotations
@Override
toRawValueback to summary
public void toRawValue(JBlock block, JVar $var)

Implements com.sun.tools.xjc.outline.FieldAccessor.toRawValue.

Doc from com.sun.tools.xjc.outline.FieldAccessor.toRawValue.

Dumps everything in this field into the given variable.

This generates code that accesses the field from outside.

Annotations
@Override