Search in sources :

Example 6 with MapMetadata

use of org.osgi.service.blueprint.reflect.MapMetadata in project aries by apache.

the class AbstractPropertyPlaceholder method processMetadata.

protected Metadata processMetadata(Metadata metadata) {
    try {
        if (metadata instanceof BeanMetadata) {
            BeanMetadata bmd = (BeanMetadata) metadata;
            processingStack.add("Bean named " + bmd.getId() + "->");
            return processBeanMetadata(bmd);
        } else if (metadata instanceof CollectionMetadata) {
            CollectionMetadata cmd = (CollectionMetadata) metadata;
            processingStack.add("Collection of type " + cmd.getCollectionClass() + "->");
            return processCollectionMetadata(cmd);
        } else if (metadata instanceof MapMetadata) {
            processingStack.add("Map->");
            return processMapMetadata((MapMetadata) metadata);
        } else if (metadata instanceof PropsMetadata) {
            processingStack.add("Properties->");
            return processPropsMetadata((PropsMetadata) metadata);
        } else if (metadata instanceof ValueMetadata) {
            processingStack.add("Value->");
            return processValueMetadata((ValueMetadata) metadata);
        } else {
            processingStack.add("Unknown Metadata " + metadata + "->");
            return metadata;
        }
    } finally {
        processingStack.removeLast();
    }
}
Also used : MutablePropsMetadata(org.apache.aries.blueprint.mutable.MutablePropsMetadata) PropsMetadata(org.osgi.service.blueprint.reflect.PropsMetadata) CollectionMetadata(org.osgi.service.blueprint.reflect.CollectionMetadata) MutableCollectionMetadata(org.apache.aries.blueprint.mutable.MutableCollectionMetadata) BeanMetadata(org.osgi.service.blueprint.reflect.BeanMetadata) MutableBeanMetadata(org.apache.aries.blueprint.mutable.MutableBeanMetadata) ValueMetadata(org.osgi.service.blueprint.reflect.ValueMetadata) MapMetadata(org.osgi.service.blueprint.reflect.MapMetadata) MutableMapMetadata(org.apache.aries.blueprint.mutable.MutableMapMetadata)

Aggregations

MapMetadata (org.osgi.service.blueprint.reflect.MapMetadata)6 BeanMetadata (org.osgi.service.blueprint.reflect.BeanMetadata)4 CollectionMetadata (org.osgi.service.blueprint.reflect.CollectionMetadata)4 MutableMapMetadata (org.apache.aries.blueprint.mutable.MutableMapMetadata)3 ComponentMetadata (org.osgi.service.blueprint.reflect.ComponentMetadata)3 MapEntry (org.osgi.service.blueprint.reflect.MapEntry)3 Metadata (org.osgi.service.blueprint.reflect.Metadata)3 PropsMetadata (org.osgi.service.blueprint.reflect.PropsMetadata)3 RefMetadata (org.osgi.service.blueprint.reflect.RefMetadata)3 ServiceMetadata (org.osgi.service.blueprint.reflect.ServiceMetadata)3 ValueMetadata (org.osgi.service.blueprint.reflect.ValueMetadata)3 ArrayList (java.util.ArrayList)2 ExtendedBeanMetadata (org.apache.aries.blueprint.ExtendedBeanMetadata)2 MutableBeanMetadata (org.apache.aries.blueprint.mutable.MutableBeanMetadata)2 MutableCollectionMetadata (org.apache.aries.blueprint.mutable.MutableCollectionMetadata)2 ReferenceListMetadata (org.osgi.service.blueprint.reflect.ReferenceListMetadata)2 RegistrationListener (org.osgi.service.blueprint.reflect.RegistrationListener)2 ServiceReferenceMetadata (org.osgi.service.blueprint.reflect.ServiceReferenceMetadata)2 WrappedServiceMetadata (org.apache.aries.application.modelling.WrappedServiceMetadata)1 ExtendedReferenceMetadata (org.apache.aries.blueprint.ExtendedReferenceMetadata)1