Package org.apache.felix.ipojo.parser

Examples of org.apache.felix.ipojo.parser.FieldMetadata


     * @return the type of the field or {@code null} if it wasn't found
     */
    private static String getTypeFromAttributeField(String fieldRequire,
            PojoMetadata manipulation) {

        FieldMetadata field = manipulation.getField(fieldRequire);
        if (field == null) {
            return null;
        } else {
            return FieldMetadata.getReflectionType(field.getFieldType());
        }
    }
View Full Code Here


                error("One temporal dependency must be attached to a field or the field is already used");
                return;
            }
            String field = deps[i].getAttribute("field");

            FieldMetadata fieldmeta = manipulation.getField(field);
            if (fieldmeta == null) {
                error("The field " + field + " does not exist in the class " + getInstanceManager().getClassName());
                return;
            }            
                       
            String fil = deps[i].getAttribute("filter");
            Filter filter = null;
            if (fil != null) {
                try {
                    filter = getInstanceManager().getContext().createFilter(fil);
                } catch (InvalidSyntaxException e) {
                    error("Cannot create the field from " + fil + ": " + e.getMessage());
                    return;
                }
            }
           
            boolean agg = false;
            boolean collection = false;
            String spec = fieldmeta.getFieldType();
            if (spec.endsWith("[]")) {
                agg = true;
                spec = spec.substring(0, spec.length() - 2);
            } else if (Collection.class.getName().equals(spec)) {
                agg = true;
View Full Code Here

                String name = publisherMetadata.getName();
                info(LOG_PREFIX + "Checking publisher " + name);

                // Check field existence and type
                String field = publisherMetadata.getField();
                FieldMetadata fieldMetadata = getPojoMetadata()
                        .getField(publisherMetadata.getField(),
                                Publisher.class.getName());
                if (fieldMetadata == null) {
                    throw new ConfigurationException(
                            "Field not found in the component : "
View Full Code Here

                        .put(publisherMetadata.getField(), publisher);

                // Register the callback that return the publisher
                // reference when the specified field is read by the
                // POJO.
                FieldMetadata fieldMetadata = getPojoMetadata()
                        .getField(publisherMetadata.getField(),
                                Publisher.class.getName());
                m_manager.register(fieldMetadata, this);

            }
View Full Code Here

TOP

Related Classes of org.apache.felix.ipojo.parser.FieldMetadata

Copyright © 2018 www.massapicom. 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.