|
||||||||||
| 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
com.sun.tools.xjc.generator.bean.field.ArrayField
final class ArrayField
Realizes a property as an "indexed property" as specified in the JAXB spec.
We will generate the following set of methods:
T[] getX(); T getX( int idx ); void setX(T[] values); void setX( int idx, T value );We still use List as our back storage. This renderer also handles boxing/unboxing if T is a boxed type.
| Nested Class Summary | |
|---|---|
(package private) class |
ArrayField.Accessor
|
| Field Summary |
|---|
| Fields inherited from class com.sun.tools.xjc.generator.bean.field.AbstractListField |
|---|
field, listT, primitiveType |
| Fields inherited from class com.sun.tools.xjc.generator.bean.field.AbstractField |
|---|
codeModel, exposedType, implType, outline, prop |
| Constructor Summary | |
|---|---|
ArrayField(ClassOutlineImpl context,
CPropertyInfo prop)
|
|
| Method Summary | |
|---|---|
protected com.sun.codemodel.JExpression |
castToImplTypeArray(com.sun.codemodel.JExpression exp)
Case from AbstractField.exposedType to array of AbstractField.implType . |
ArrayField.Accessor |
create(com.sun.codemodel.JExpression targetObject)
Creates a new FieldAccessor of this field
for the specified object. |
void |
generateAccessors()
Generates accessor methods. |
protected void |
generateArray()
|
protected 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.AbstractListField |
|---|
fixNullRef, generate |
| 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 |
| Constructor Detail |
|---|
ArrayField(ClassOutlineImpl context,
CPropertyInfo prop)
| Method Detail |
|---|
protected final void generateArray()
public void generateAccessors()
AbstractListField
generateAccessors in class AbstractListFieldpublic com.sun.codemodel.JType getRawType()
FieldOutlineThis 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.
getRawType in interface FieldOutlinegetRawType in class AbstractListFieldprotected com.sun.codemodel.JClass getCoreListType()
AbstractListField
getCoreListType in class AbstractListFieldpublic ArrayField.Accessor create(com.sun.codemodel.JExpression targetObject)
FieldOutlineFieldAccessor of this field
for the specified object.
targetObject - Evaluates to an object, and the field on this object
will be accessed.protected final com.sun.codemodel.JExpression castToImplTypeArray(com.sun.codemodel.JExpression exp)
AbstractField.exposedType to array of AbstractField.implType .
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||