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

pack-priv abstract Class AbstractFieldWithVar

extends AbstractField
Class Inheritance
Known Direct Subclasses
com.sun.tools.xjc.generator.bean.field.SingleField, com.sun.tools.xjc.generator.bean.field.UnboxedField
Imports
com.sun.codemodel.JBlock, .JExpression, .JFieldRef, .JFieldVar, .JMod, .JType, .JVar, com.sun.tools.xjc.generator.bean.ClassOutlineImpl, com.sun.tools.xjc.model.CPropertyInfo

Author
Kohsuke Kawaguchi ([email protected]), Martin Grebac

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected abstract class

Field Summary

Modifier and TypeField and Description
private JFieldVar
field

Field declaration of the actual list object that we use to store data.

Inherited from com.sun.tools.xjc.generator.bean.field.AbstractField:
codeModelexposedTypeimplTypeoutlineprop

Constructor Summary

AccessConstructor and Description
pack-priv
AbstractFieldWithVar(ClassOutlineImpl outline, CPropertyInfo prop)

Invoke createField() after calling the constructor.

Method Summary

Modifier and TypeMethod and Description
protected final void
protected abstract JType
getFieldType()

Returns the type used to store the value of the field in memory.

protected String
getGetterMethod()

Gets the name of the getter method.

public final JType
getRawType()

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

Gets the type of the "raw value".

protected JFieldVar
ref()

Inherited from com.sun.tools.xjc.generator.bean.field.AbstractField:
annotatecastToImplTypegenerateFieldgetOptionsgetPropertyInfogetTypelistPossibleTypesparent

Field Detail

fieldback to summary
private JFieldVar field

Field declaration of the actual list object that we use to store data.

Constructor Detail

AbstractFieldWithVarback to summary
pack-priv AbstractFieldWithVar(ClassOutlineImpl outline, CPropertyInfo prop)

Invoke createField() after calling the constructor.

Method Detail

createFieldback to summary
protected final void createField()
getFieldTypeback to summary
protected abstract JType getFieldType()

Returns the type used to store the value of the field in memory.

getGetterMethodback to summary
protected String getGetterMethod()

Gets the name of the getter method.

This encapsulation is necessary because sometimes we use isXXXX as the method name.

getRawTypeback to summary
public final JType getRawType()

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

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

Gets the type of the "raw value".

This type can represent the entire value of this field. For fields that can carry multiple values, this is an array.

This type allows the client of the outline to generate code to set/get values from a property.

Annotations
@Override
refback to summary
protected JFieldVar ref()
com.sun.tools.xjc.generator.bean.field back to summary

protected abstract Class AbstractFieldWithVar.Accessor

extends Accessor
Class Inheritance
Known Direct Subclasses
com.sun.tools.xjc.generator.bean.field.SingleField.Accessor

Field Summary

Modifier and TypeField and Description
protected final JFieldRef
$ref

Reference to the field bound by the target object.

Inherited from com.sun.tools.xjc.generator.bean.field.AbstractField.Accessor:
$target

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public final 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 final 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.AbstractField.Accessor:
getPropertyInfoowner

Field Detail

$refback to summary
protected final JFieldRef $ref

Reference to the field bound by the target object.

Constructor Detail

Accessorback to summary
protected Accessor(JExpression $target)

Method Detail

fromRawValueback to summary
public final 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 final 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