|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.tools.xjc.generator.bean.field.AbstractField.Accessor
com.sun.tools.xjc.generator.bean.field.AbstractListField.Accessor
protected abstract class AbstractListField.Accessor
Field Summary | |
---|---|
protected com.sun.codemodel.JFieldRef |
field
Reference to the AbstractListField.field
of the target object. |
Fields inherited from class com.sun.tools.xjc.generator.bean.field.AbstractField.Accessor |
---|
$target |
Constructor Summary | |
---|---|
protected |
AbstractListField.Accessor(com.sun.codemodel.JExpression $target)
|
Method Summary | |
---|---|
void |
add(com.sun.codemodel.JBlock body,
com.sun.codemodel.JExpression newValue)
Generate a code to add the "newValue" to this field and set it to the 'body'. |
protected com.sun.codemodel.JExpression |
box(com.sun.codemodel.JExpression exp)
|
com.sun.codemodel.JExpression |
count()
|
com.sun.codemodel.JExpression |
getContentValue()
Get the "content" of this field in one object. |
com.sun.codemodel.JExpression |
hasSetValue()
Return an expression that evaluates to true only when this field has a set value(s). |
protected com.sun.codemodel.JExpression |
ref(boolean canBeNull)
Returns a reference to the List field that stores the data. |
void |
toArray(com.sun.codemodel.JBlock block,
com.sun.codemodel.JExpression $array)
Dumps everything in this field into the given array, which is guaranteed to have the enough space to store all the values (that is, the caller is responsible for ensuring the size of the array.) The type of the array must be the same as getPropertyInfo().getType() . |
protected com.sun.codemodel.JExpression |
unbox(com.sun.codemodel.JExpression exp)
|
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.AbstractField.Accessor |
---|
getPropertyInfo, owner |
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 |
---|
protected final com.sun.codemodel.JFieldRef field
AbstractListField.field
of the target object.
Constructor Detail |
---|
protected AbstractListField.Accessor(com.sun.codemodel.JExpression $target)
Method Detail |
---|
protected final com.sun.codemodel.JExpression unbox(com.sun.codemodel.JExpression exp)
protected final com.sun.codemodel.JExpression box(com.sun.codemodel.JExpression exp)
protected final com.sun.codemodel.JExpression ref(boolean canBeNull)
Using this method hides the fact that the list is lazily created.
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.public void add(com.sun.codemodel.JBlock body, com.sun.codemodel.JExpression newValue)
FieldAccessor
public void toArray(com.sun.codemodel.JBlock block, com.sun.codemodel.JExpression $array)
FieldAccessor
getPropertyInfo().getType()
.
public com.sun.codemodel.JExpression count()
public void unsetValues(com.sun.codemodel.JBlock body)
FieldAccessor
body
- The code will be appended at the end of this block.public com.sun.codemodel.JExpression hasSetValue()
FieldAccessor
public com.sun.codemodel.JExpression getContentValue()
FieldAccessor
The notion of "content" is defined in the spec.
Typically, it is a single Object
that represents
the field. For fields with a primitive value, this is a boxed
type. For a list field, this is a List
.
This object will be returned from the getContent method of the choice content interface.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |