Search in sources :

Example 1 with TypedAttribute

use of aQute.bnd.osgi.resource.TypedAttribute in project bnd by bndtools.

the class XMLResourceGenerator method attributes.

private void attributes(Tag cr, Map<String, Object> atrributes) throws Exception {
    for (Entry<String, Object> e : atrributes.entrySet()) {
        Object value = e.getValue();
        if (value == null)
            continue;
        TypedAttribute ta = TypedAttribute.getTypedAttribute(value);
        if (ta == null)
            continue;
        Tag d = new Tag(cr, "attribute");
        d.addAttribute("name", e.getKey());
        d.addAttribute("value", ta.value);
        if (ta.type != null)
            d.addAttribute("type", ta.type);
    }
}
Also used : TypedAttribute(aQute.bnd.osgi.resource.TypedAttribute) Tag(aQute.lib.tag.Tag)

Aggregations

TypedAttribute (aQute.bnd.osgi.resource.TypedAttribute)1 Tag (aQute.lib.tag.Tag)1