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.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected JExpression | |
| public ArrayField. | create(JExpression targetObject)
Implements com. Creates a new |
| public void | generateAccessors()
Implements abstract com. Generates accessor methods. |
| protected void | |
| protected JClass | getCoreListType()
Implements abstract com. Concrete class that implements the List interface. |
| public JType | getRawType()
Overrides com. Implements com. Gets the type of the "raw value". |
| $getAll | back to summary |
|---|---|
| private JMethod $getAll | |
| $setAll | back to summary |
|---|---|
| private JMethod $setAll | |
| ArrayField | back to summary |
|---|---|
| pack-priv ArrayField(ClassOutlineImpl context, CPropertyInfo prop) | |
| castToImplTypeArray | back to summary |
|---|---|
| protected JExpression castToImplTypeArray(JExpression exp) Case from | |
| create | back to summary |
|---|---|
| public ArrayField. Implements com. Doc from com. Creates a new
| |
| generateAccessors | back to summary |
|---|---|
| public void generateAccessors() Implements abstract com. Doc from com. Generates accessor methods.
| |
| generateArray | back to summary |
|---|---|
| protected void generateArray() | |
| getCoreListType | back to summary |
|---|---|
| protected JClass getCoreListType() Implements abstract com. Doc from com. Concrete class that implements the List interface. Used as the actual data storage.
| |
| getRawType | back to summary |
|---|---|
| public JType getRawType() Overrides com. Implements com. Doc from com. Gets the type of the "raw value". 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.
| |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | fromRawValue(JBlock block, String uniqueName, JExpression $var)
Implements com. Sets the value of the field from the specified expression. |
| public JExpression | hasSetValue()
Overrides com. Implements com. Return an expression that evaluates to true only when this field has a set value(s). |
| public void | toRawValue(JBlock block, JVar $var)
Implements com. Dumps everything in this field into the given variable. |
| Accessor | back to summary |
|---|---|
| protected Accessor(JExpression $target) | |
| fromRawValue | back to summary |
|---|---|
| public void fromRawValue(JBlock block, String uniqueName, JExpression $var) Implements com. Doc from com. Sets the value of the field from the specified expression. This generates code that accesses the field from outside.
| |
| hasSetValue | back to summary |
|---|---|
| public JExpression hasSetValue() Overrides com. Implements com. Doc from com. Return an expression that evaluates to true only when this field has a set value(s).
| |
| toRawValue | back to summary |
|---|---|
| public void toRawValue(JBlock block, JVar $var) Implements com. Doc from com. Dumps everything in this field into the given variable. This generates code that accesses the field from outside.
| |