Search in sources :

Example 1 with MutableMapEntry

use of org.apache.aries.blueprint.mutable.MutableMapEntry in project aries by apache.

the class AbstractPropertyPlaceholder method processMapEntries.

protected List<MapEntry> processMapEntries(List<MapEntry> entries) {
    for (MapEntry entry : entries) {
        try {
            processingStack.add("Map Entry Key: " + entry.getKey() + " Value: " + entry.getValue() + "->");
            if (entry instanceof MutableMapEntry) {
                ((MutableMapEntry) entry).setKey((NonNullMetadata) processMetadata(entry.getKey()));
                ((MutableMapEntry) entry).setValue(processMetadata(entry.getValue()));
            } else {
                printWarning(entry, "Map Entry");
                processMetadata(entry.getKey());
                processMetadata(entry.getValue());
            }
        } finally {
            processingStack.removeLast();
        }
    }
    return entries;
}
Also used : MutableMapEntry(org.apache.aries.blueprint.mutable.MutableMapEntry) MapEntry(org.osgi.service.blueprint.reflect.MapEntry) MutableMapEntry(org.apache.aries.blueprint.mutable.MutableMapEntry)

Aggregations

MutableMapEntry (org.apache.aries.blueprint.mutable.MutableMapEntry)1 MapEntry (org.osgi.service.blueprint.reflect.MapEntry)1