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

public Class IsSetField

extends AbstractField
Class Inheritance
Imports
com.sun.codemodel.JBlock, .JCodeModel, .JExpr, .JExpression, .JType, .JVar, com.sun.tools.xjc.generator.bean.ClassOutlineImpl, .MethodWriter, com.sun.tools.xjc.model.CPropertyInfo, com.sun.tools.xjc.outline.FieldAccessor, .FieldOutline

Author
Kohsuke Kawaguchi ([email protected])

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final FieldOutline
private final boolean
private final boolean
Inherited from com.sun.tools.xjc.generator.bean.field.AbstractField:
codeModelexposedTypeimplTypeoutlineprop

Constructor Summary

AccessConstructor and Description
protected
IsSetField(ClassOutlineImpl outline, CPropertyInfo prop, FieldOutline core, boolean unsetMethod, boolean issetMethod)

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.

private void
public JType
getRawType()

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

Gets the type of the "raw value".

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

Field Detail

coreback to summary
private final FieldOutline core
generateIsSetMethodback to summary
private final boolean generateIsSetMethod
generateUnSetMethodback to summary
private final boolean generateUnSetMethod

Constructor Detail

IsSetFieldback to summary
protected IsSetField(ClassOutlineImpl outline, CPropertyInfo prop, FieldOutline core, boolean unsetMethod, boolean issetMethod)

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
generateback to summary
private void generate(ClassOutlineImpl outline, CPropertyInfo prop)
getRawTypeback to summary
public 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
com.sun.tools.xjc.generator.bean.field back to summary

private Class IsSetField.Accessor

extends Accessor
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final FieldAccessor
Inherited from com.sun.tools.xjc.generator.bean.field.AbstractField.Accessor:
$target

Constructor Summary

AccessConstructor and Description
pack-priv

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 JExpression
hasSetValue()

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

Return an expression that evaluates to true only when this field has a set value(s).

public void
toRawValue(JBlock block, JVar $var)

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

Dumps everything in this field into the given variable.

public void
unsetValues(JBlock body)

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

Generates a code fragment to remove any "set" value and move this field to the "unset" state.

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

Field Detail

coreback to summary
private final FieldAccessor core

Constructor Detail

Accessorback to summary
pack-priv 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
hasSetValueback to summary
public JExpression hasSetValue()

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

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

Return an expression that evaluates to true only when this field has a set value(s).

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
unsetValuesback to summary
public void unsetValues(JBlock body)

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

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

Generates a code fragment to remove any "set" value and move this field to the "unset" state.

Annotations
@Override