summaryrefslogtreecommitdiff
path: root/source/com
diff options
context:
space:
mode:
authorabranson <andrew.branson@cern.ch>2012-03-13 16:00:55 +0100
committerabranson <andrew.branson@cern.ch>2012-03-13 16:00:55 +0100
commitda696fee5935816d5acb93057be1d731b82d5aa1 (patch)
tree1679080420c187a0bd8683131972d77971be80d8 /source/com
parent97bf49e5642abdef8ca24e31aeeb82e6547ce584 (diff)
Imply 'Name' property on instantiation if not explicity declared
Diffstat (limited to 'source/com')
-rw-r--r--source/com/c2kernel/property/PropertyDescriptionList.java11
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;
+ }
}