Top Description Inners Fields Constructors Methods
com.sun.tools.xjc.api.impl.s2j

pack-priv abstract Class ElementAdapter

extends Object
implements FieldOutline
Class Inheritance
All Implemented Interfaces
com.sun.tools.xjc.outline.FieldOutline
Known Direct Subclasses
com.sun.tools.xjc.api.impl.s2j.ElementCollectionAdapter, com.sun.tools.xjc.api.impl.s2j.ElementSingleAdapter
Imports
jakarta.xml.bind.JAXBElement, javax.xml.namespace.QName, com.sun.tools.xjc.outline.FieldOutline, .ClassOutline, .FieldAccessor, .Outline, com.sun.tools.xjc.model.CPropertyInfo, .CElementInfo, .CReferencePropertyInfo, com.sun.codemodel.JExpression, .JBlock, .JExpr, .JCodeModel, .JInvocation

FieldOutline that wraps another FieldOutline and allows JAX-WS to access values without using about JAXBElement.

That means if a value is requested, we unwrap JAXBElement and give it to them. If a value is set, we wrap that into JAXBElement, etc.

This can be used only with CReferencePropertyInfo (or else it won't be JAXBElement, with one CElementInfo (or else we can't infer the tag name.)

Author
Kohsuke Kawaguchi

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected abstract class

Field Summary

Modifier and TypeField and Description
protected final FieldOutline
protected final CElementInfo
ei

The only one CElementInfo that can be in the property.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected final JCodeModel
public CPropertyInfo
getPropertyInfo()

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

Gets the corresponding model object.

protected final Outline
public ClassOutline
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

coreback to summary
protected final FieldOutline core
eiback to summary
protected final CElementInfo ei

The only one CElementInfo that can be in the property.

Constructor Detail

ElementAdapterback to summary
public ElementAdapter(FieldOutline core, CElementInfo ei)

Method Detail

codeModelback to summary
protected final JCodeModel codeModel()
getPropertyInfoback to summary
public CPropertyInfo getPropertyInfo()

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

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

Gets the corresponding model object.

Annotations
@Override
outlineback to summary
protected final Outline outline()
parentback to summary
public ClassOutline parent()

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

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

Gets the enclosing ClassOutline.

Annotations
@Override
com.sun.tools.xjc.api.impl.s2j back to summary

protected abstract Class ElementAdapter.FieldAccessorImpl

extends Object
implements FieldAccessor
Class Inheritance
  • java.lang.Object
  • com.sun.tools.xjc.api.impl.s2j.ElementAdapter.FieldAccessorImpl
All Implemented Interfaces
com.sun.tools.xjc.outline.FieldAccessor
Known Direct Subclasses
com.sun.tools.xjc.api.impl.s2j.ElementCollectionAdapter.FieldAccessorImpl, com.sun.tools.xjc.api.impl.s2j.ElementSingleAdapter.FieldAccessorImpl

Field Summary

Modifier and TypeField and Description
pack-priv final FieldAccessor

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected final JInvocation
createJAXBElement(JExpression $var)

Wraps a type value into a JAXBElement.

public CPropertyInfo
getPropertyInfo()

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

Short for owner().getPropertyInfo()

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 FieldOutline
owner()

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

Gets the FieldOutline from which this object is created.

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 java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

accback to summary
pack-priv final FieldAccessor acc

Constructor Detail

FieldAccessorImplback to summary
public FieldAccessorImpl(JExpression target)

Method Detail

createJAXBElementback to summary
protected final JInvocation createJAXBElement(JExpression $var)

Wraps a type value into a JAXBElement.

getPropertyInfoback to summary
public CPropertyInfo getPropertyInfo()

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

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

Short for owner().getPropertyInfo()

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
ownerback to summary
public FieldOutline owner()

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

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

Gets the FieldOutline from which this object is created.

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