com.sun.tools.xjc.generator.bean.field
Class SingleField.Accessor

java.lang.Object
  extended by com.sun.tools.xjc.generator.bean.field.AbstractField.Accessor
      extended by com.sun.tools.xjc.generator.bean.field.AbstractFieldWithVar.Accessor
          extended by com.sun.tools.xjc.generator.bean.field.SingleField.Accessor
All Implemented Interfaces:
FieldAccessor
Enclosing class:
SingleField

protected class SingleField.Accessor
extends AbstractFieldWithVar.Accessor


Field Summary
 
Fields inherited from class com.sun.tools.xjc.generator.bean.field.AbstractFieldWithVar.Accessor
$ref
 
Fields inherited from class com.sun.tools.xjc.generator.bean.field.AbstractField.Accessor
$target
 
Constructor Summary
protected SingleField.Accessor(com.sun.codemodel.JExpression $target)
           
 
Method Summary
 com.sun.codemodel.JExpression hasSetValue()
          Return an expression that evaluates to true only when this field has a set value(s).
 void unsetValues(com.sun.codemodel.JBlock body)
          Generates a code fragment to remove any "set" value and move this field to the "unset" state.
 
Methods inherited from class com.sun.tools.xjc.generator.bean.field.AbstractFieldWithVar.Accessor
fromRawValue, toRawValue
 
Methods inherited from class com.sun.tools.xjc.generator.bean.field.AbstractField.Accessor
getPropertyInfo, owner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleField.Accessor

protected SingleField.Accessor(com.sun.codemodel.JExpression $target)
Method Detail

unsetValues

public void unsetValues(com.sun.codemodel.JBlock body)
Description copied from interface: FieldAccessor
Generates a code fragment to remove any "set" value and move this field to the "unset" state.

Parameters:
body - The code will be appended at the end of this block.

hasSetValue

public com.sun.codemodel.JExpression hasSetValue()
Description copied from interface: FieldAccessor
Return an expression that evaluates to true only when this field has a set value(s).

Returns:
null if the isSetXXX/unsetXXX method does not make sense for the given field.