List.
List getXXX();
Since unmarshaller just adds new values into the storage, we can't fill the storage by default values at the time of instanciation. (or oherwise values found in the document will be appended to default values, where it should overwrite them.)
Therefore, when the object is created, the storage will be empty. When the getXXX method is called, we'll check if the storage is modified in anyway. If it is modified, it must mean that the values are found in the document, so we just return it. Otherwise we will fill in default values and return it to the user.
When a list has default values, its dirty flag is set to true. Marshaller will check this and treat it appropriately.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| private JMethod | $get
List getFIELD() method. |
| private final JClass | coreList
A concrete class that implements the List interface. |
| Access | Constructor and Description |
|---|---|
| protected | ContentListField(ClassOutlineImpl context, CPropertyInfo prop, JClass
A concrete class that implements the List interface.
An instance of this class will be used to store data
for this field. coreList)
|
| Modifier and Type | Method and Description |
|---|---|
| public FieldAccessor | create(JExpression targetObject)
Implements com. Creates a new |
| public void | generateAccessors()
Implements abstract com. Generates accessor methods. |
| protected final JClass | getCoreListType()
Implements abstract com. Concrete class that implements the List interface. |
| protected JType | getType(final Aspect aspect)
Overrides com. Compute the type of a |
| $get | back to summary |
|---|---|
| private JMethod $get List getFIELD() method. | |
| coreList | back to summary |
|---|---|
| private final JClass coreList A concrete class that implements the List interface. An instance of this class will be used to store data for this field. | |
| ContentListField | back to summary |
|---|---|
protected ContentListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList)
| |
| create | back to summary |
|---|---|
| public FieldAccessor create(JExpression targetObject) Implements com. Doc from com. Creates a new
| |
| generateAccessors | back to summary |
|---|---|
| public void generateAccessors() Implements abstract com. Doc from com. Generates accessor methods.
| |
| getCoreListType | back to summary |
|---|---|
| protected final JClass getCoreListType() Implements abstract com. Doc from com. Concrete class that implements the List interface. Used as the actual data storage.
| |
| getType | back to summary |
|---|---|
| protected JType getType(final Aspect aspect) Overrides com. Doc from com. Compute the type of a
| |
| 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 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.
| |
| 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.
| |