com.sun.tools.xjc.api.impl.s2j
Class ElementAdapter.FieldAccessorImpl

java.lang.Object
  extended by com.sun.tools.xjc.api.impl.s2j.ElementAdapter.FieldAccessorImpl
All Implemented Interfaces:
FieldAccessor
Direct Known Subclasses:
ElementCollectionAdapter.FieldAccessorImpl, ElementSingleAdapter.FieldAccessorImpl
Enclosing class:
ElementAdapter

protected abstract class ElementAdapter.FieldAccessorImpl
extends Object
implements FieldAccessor


Field Summary
(package private)  FieldAccessor acc
           
 
Constructor Summary
ElementAdapter.FieldAccessorImpl(com.sun.codemodel.JExpression target)
           
 
Method Summary
protected  com.sun.codemodel.JInvocation createJAXBElement(com.sun.codemodel.JExpression $var)
          Wraps a type value into a JAXBElement.
 CPropertyInfo getPropertyInfo()
          Short for owner().getPropertyInfo()
 com.sun.codemodel.JExpression hasSetValue()
          Return an expression that evaluates to true only when this field has a set value(s).
 FieldOutline owner()
          Gets the FieldOutline from which this object is created.
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.tools.xjc.outline.FieldAccessor
fromRawValue, toRawValue
 

Field Detail

acc

final FieldAccessor acc
Constructor Detail

ElementAdapter.FieldAccessorImpl

public ElementAdapter.FieldAccessorImpl(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.

Specified by:
unsetValues in interface FieldAccessor
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).

Specified by:
hasSetValue in interface FieldAccessor
Returns:
null if the isSetXXX/unsetXXX method does not make sense for the given field.

owner

public FieldOutline owner()
Description copied from interface: FieldAccessor
Gets the FieldOutline from which this object is created.

Specified by:
owner in interface FieldAccessor

getPropertyInfo

public CPropertyInfo getPropertyInfo()
Description copied from interface: FieldAccessor
Short for owner().getPropertyInfo()

Specified by:
getPropertyInfo in interface FieldAccessor

createJAXBElement

protected final com.sun.codemodel.JInvocation createJAXBElement(com.sun.codemodel.JExpression $var)
Wraps a type value into a JAXBElement.