diff options
| author | abranson <andrew.branson@cern.ch> | 2012-03-13 16:00:55 +0100 |
|---|---|---|
| committer | abranson <andrew.branson@cern.ch> | 2012-03-13 16:00:55 +0100 |
| commit | da696fee5935816d5acb93057be1d731b82d5aa1 (patch) | |
| tree | 1679080420c187a0bd8683131972d77971be80d8 /source/com/c2kernel | |
| parent | 97bf49e5642abdef8ca24e31aeeb82e6547ce584 (diff) | |
Imply 'Name' property on instantiation if not explicity declared
Diffstat (limited to 'source/com/c2kernel')
| -rw-r--r-- | source/com/c2kernel/property/PropertyDescriptionList.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/com/c2kernel/property/PropertyDescriptionList.java b/source/com/c2kernel/property/PropertyDescriptionList.java index 4728569..a6c68e2 100644 --- a/source/com/c2kernel/property/PropertyDescriptionList.java +++ b/source/com/c2kernel/property/PropertyDescriptionList.java @@ -48,5 +48,16 @@ public class PropertyDescriptionList extends CastorArrayList<PropertyDescription }
return false;
}
+
+ public PropertyArrayList instanciate() {
+ PropertyArrayList props = new PropertyArrayList();
+ for (int i = 0; i < list.size(); i++) {
+ PropertyDescription pd = list.get(i);
+ String propName = pd.getName();
+ String propVal = pd.getDefaultValue();
+ props.list.add( new Property(propName, propVal));
+ }
+ return props;
+ }
}
|
