|
||||||||||
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
com.sun.tools.xjc.generator.bean.field.AbstractListField
abstract class AbstractListField
Common code for property renderer that generates a List as its underlying data structure.
For performance reasons, the actual list object used to store data is lazily created.
Nested Class Summary | |
---|---|
protected class |
AbstractListField.Accessor
|
Field Summary | |
---|---|
protected com.sun.codemodel.JFieldVar |
field
The field that stores the list. |
protected com.sun.codemodel.JClass |
listT
|
protected com.sun.codemodel.JPrimitiveType |
primitiveType
If this collection property is a collection of a primitive type, this variable refers to that primitive type. |
Fields inherited from class com.sun.tools.xjc.generator.bean.field.AbstractField |
---|
codeModel, exposedType, implType, outline, prop |
Constructor Summary | |
---|---|
protected |
AbstractListField(ClassOutlineImpl outline,
CPropertyInfo prop,
boolean eagerInstanciation)
Call generate() method right after this. |
Method Summary | |
---|---|
protected void |
fixNullRef(com.sun.codemodel.JBlock block)
Generates statement(s) so that the successive AbstractListField.Accessor.ref(boolean) with
true will always return a non-null list. |
protected void |
generate()
|
protected abstract void |
generateAccessors()
Generates accessor methods. |
protected abstract com.sun.codemodel.JClass |
getCoreListType()
Concrete class that implements the List interface. |
com.sun.codemodel.JType |
getRawType()
Gets the type of the "raw value". |
Methods inherited from class com.sun.tools.xjc.generator.bean.field.AbstractField |
---|
annotate, castToImplType, generateField, getOptions, getPropertyInfo, getType, listPossibleTypes, parent |
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.FieldOutline |
---|
create |
Field Detail |
---|
protected com.sun.codemodel.JFieldVar field
protected final com.sun.codemodel.JPrimitiveType primitiveType
protected final com.sun.codemodel.JClass listT
Constructor Detail |
---|
protected AbstractListField(ClassOutlineImpl outline, CPropertyInfo prop, boolean eagerInstanciation)
generate()
method right after this.
Method Detail |
---|
protected final void generate()
protected final void fixNullRef(com.sun.codemodel.JBlock block)
AbstractListField.Accessor.ref(boolean)
with
true will always return a non-null list.
This is useful to avoid generating redundant internal getter.
public com.sun.codemodel.JType getRawType()
FieldOutline
This type can represent the entire value of this field. For fields that can carry multiple values, this is an array.
This type allows the client of the outline to generate code to set/get values from a property.
protected abstract com.sun.codemodel.JClass getCoreListType()
protected abstract void generateAccessors()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |