com.sun.tools.xjc.generator.bean.field

Class AbstractListField.Accessor

protected abstract class AbstractListField.Accessor extends AbstractField.Accessor

Field Summary
protected JFieldReffield
Reference to the field of the target object.
Constructor Summary
protected Accessor(JExpression $target)
Method Summary
protected JExpressionbox(JExpression exp)
JExpressioncount()
JExpressionhasSetValue()
protected JExpressionref(boolean canBeNull)
Returns a reference to the List field that stores the data.
protected JExpressionunbox(JExpression exp)
voidunsetValues(JBlock body)

Field Detail

field

protected final JFieldRef field
Reference to the field of the target object.

Constructor Detail

Accessor

protected Accessor(JExpression $target)

Method Detail

box

protected final JExpression box(JExpression exp)

count

public JExpression count()

hasSetValue

public JExpression hasSetValue()

ref

protected final JExpression ref(boolean canBeNull)
Returns a reference to the List field that stores the data.

Using this method hides the fact that the list is lazily created.

Parameters: canBeNull if true, the returned expression may be null (this is when the list is still not constructed.) This could be useful when the caller can deal with null more efficiently. When the list is null, it should be treated as if the list is empty. if false, the returned expression will never be null. This is the behavior users would see.

unbox

protected final JExpression unbox(JExpression exp)

unsetValues

public void unsetValues(JBlock body)