Examples of ReifiedType


Examples of org.osgi.service.blueprint.container.ReifiedType

            instance = new DummyDictionaryAsMap((Dictionary) o);
        } else {
            throw new ComponentDefinitionException("Specified map type does not implement the Map interface: " + mapType.getName());
        }

        ReifiedType defaultConvertKeyType = getType(keyType);
        ReifiedType defaultConvertValueType = getType(valueType);
               
        // add map entries
        try {
            for (Recipe[] entry : entries) {
                ReifiedType convertKeyType = workOutConversionType(entry[0], defaultConvertKeyType);
                Object key = convert(entry[0].create(), convertKeyType);
                // Each entry may have its own types
                ReifiedType convertValueType = workOutConversionType(entry[1], defaultConvertValueType);
                Object value = entry[1] != null ? convert(entry[1].create(), convertValueType) : null;
                instance.put(key, value);
            }
        } catch (Exception e) {
          throw new ComponentDefinitionException(e);

Examples of org.osgi.service.blueprint.container.ReifiedType

        if (!(o instanceof Collection)) {
            throw new ComponentDefinitionException("Specified collection type does not implement the Collection interface: " + type.getName());
        }
        Collection instance = (Collection) o;

        ReifiedType defaultConversionType = loadType(defaultValueType);
        Type conversionType = null;
        for (Recipe recipe : list) {
            Object value;
            if (recipe != null) {
                try {
                  conversionType = defaultConversionType.getRawClass();
                    if (recipe instanceof ValueRecipe) {
                      conversionType = ((ValueRecipe)recipe).getValueType();
                    }
                    value = convert(recipe.create(), conversionType);
                } catch (Exception e) {
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.