com.sun.tools.xjc.generator.bean.field
protected abstract class AbstractListField.Accessor extends AbstractField.Accessor
Field Summary | |
---|---|
protected JFieldRef | field
Reference to the field
of the target object. |
Constructor Summary | |
---|---|
protected | Accessor(JExpression $target) |
Method Summary | |
---|---|
protected JExpression | box(JExpression exp) |
JExpression | count() |
JExpression | hasSetValue() |
protected JExpression | ref(boolean canBeNull)
Returns a reference to the List field that stores the data.
|
protected JExpression | unbox(JExpression exp) |
void | unsetValues(JBlock body) |
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.