A cool feature could be a general-purpose parser to parser the value
string and instanciate from it Object or array of Object
For instance (108.16.10.2, 108.16.10.10 and many others),
<property
field="m_myProducerFlavor"
name="wireadmin.producer.flavors"
value="{org.osgi.util.measurement.Measurement, java.lang.Double}"
parser="fr.imag.osgi.ipojo.wireadmin.ClassArrayParser"
/>
public class ClassArrayParser {
public ClassArrayParser(String value) { ... } public Class[]
newInstance() { ... }
}
This is possible but it is not simple.
At packaging time, attribute does not have any semantic, so iPOJO plugin
cannot know that your parser attribute contains a class name and that it
needs to add the import to the bundle manifest. So, you need to ensure
that your class is inside the bundle. If you do this assumption, the
handler managing properties could at runtime interpret the attribute
(the handler know the semantic of the attribute), load the class, and
create your array.
Clément