Package org.apache.camel

Examples of org.apache.camel.URIField


        if (config != null && name != null) {
            Class<?> clazz = config.getClass();
            Field[] fields = clazz.getDeclaredFields();
   
            Field found;
            URIField anno;
            for (final Field field : fields) {
                anno = field.getAnnotation(URIField.class);
                if (anno == null ? field.getName().equals(name) : anno.component().equals(name)
                    || (anno.component().equals(EndpointConfiguration.URI_QUERY) && anno.parameter().equals(name))) {
   
                    found = field;
                    LOG.trace("Found field {}.{} as candidate for parameter {}", new Object[]{clazz.getName(), found.getName(), name});
                    return found;
                }
View Full Code Here


        Field[] fields = clazz.getDeclaredFields();
       
        // Put the Fields in a Map first for a prettier print
        Map<String, Field> map = new HashMap<String, Field>();

        URIField anno = null;
        for (final Field field : fields) {
            anno = field.getAnnotation(URIField.class);
            String key = anno == null ? field.getName()
                : (EndpointConfiguration.URI_QUERY.equals(anno.parameter()) ? anno.parameter() : anno.component());
            map.put(key, field);
        }

        // Log standard URI components and remove them from the map
        logConfigurationField(config, map, EndpointConfiguration.URI_SCHEME, true);
View Full Code Here

    protected static void logConfigurationField(EndpointConfiguration config, Field field) {
        if (field == null) {
            return;
        }
        URIField anno = field.getAnnotation(URIField.class);
        if (anno != null) {
            LOG.info("  @URIField(component = \"{}\", parameter = \"{}\")", anno.component(), anno.parameter());
        }
        LOG.info("  {} {}={}", new Object[] {field.getType().getName(), field.getName(), config.getParameter(field.getName())});
    }
View Full Code Here

        Field[] fields = clazz.getDeclaredFields();
       
        // Put the Fields in a Map first for a prettier print
        Map<String, Field> map = new HashMap<String, Field>();

        URIField anno = null;
        for (final Field field : fields) {
            anno = field.getAnnotation(URIField.class);
            String key = anno == null ? field.getName()
                : (EndpointConfiguration.URI_QUERY.equals(anno.parameter()) ? anno.parameter() : anno.component());
            map.put(key, field);
        }

        // Log standard URI components and remove them from the map
        logConfigurationField(config, map, EndpointConfiguration.URI_SCHEME, true);
View Full Code Here

    protected static void logConfigurationField(EndpointConfiguration config, Field field) {
        if (field == null) {
            return;
        }
        URIField anno = field.getAnnotation(URIField.class);
        if (anno != null) {
            LOG.info("  @URIField(component = \"{}\", parameter = \"{}\")", anno.component(), anno.parameter());
        }
        LOG.info("  {} {}={}", new Object[] {field.getType().getName(), field.getName(), config.getParameter(field.getName())});
    }
View Full Code Here

        if (config != null && name != null) {
            Class<?> clazz = config.getClass();
            Field[] fields = clazz.getDeclaredFields();
   
            Field found = null;
            URIField anno = null;
            for (final Field field : fields) {
                anno = field.getAnnotation(URIField.class);
                if (anno == null ? field.getName().equals(name) : anno.component().equals(name)
                    || (anno.component().equals(EndpointConfiguration.URI_QUERY) && anno.parameter().equals(name))) {
   
                    found = field;
                    LOG.trace("Found field {}.{} as candidate for parameter {}",
                        new Object[] {clazz.getName(), found != null ? found.getName() : "<null>", name});
                    return found;
View Full Code Here

        if (config != null && name != null) {
            Class<?> clazz = config.getClass();
            Field[] fields = clazz.getDeclaredFields();
   
            Field found;
            URIField anno;
            for (final Field field : fields) {
                anno = field.getAnnotation(URIField.class);
                if (anno == null ? field.getName().equals(name) : anno.component().equals(name)
                    || (anno.component().equals(EndpointConfiguration.URI_QUERY) && anno.parameter().equals(name))) {
   
                    found = field;
                    LOG.trace("Found field {}.{} as candidate for parameter {}", new Object[]{clazz.getName(), found.getName(), name});
                    return found;
                }
View Full Code Here

    protected static void logConfigurationField(EndpointConfiguration config, Field field) {
        if (field == null) {
            return;
        }
        URIField anno = field.getAnnotation(URIField.class);
        if (anno != null) {
            LOG.info("  @URIField(component = \"{}\", parameter = \"{}\")", anno.component(), anno.parameter());
        }
        LOG.info("  {} {}={}", new Object[] {field.getType().getName(), field.getName(), config.getParameter(field.getName())});
    }
View Full Code Here

        Field[] fields = clazz.getDeclaredFields();
       
        // Put the Fields in a Map first for a prettier print
        Map<String, Field> map = new HashMap<String, Field>();

        URIField anno = null;
        for (final Field field : fields) {
            anno = field.getAnnotation(URIField.class);
            String key = anno == null ? field.getName()
                : (EndpointConfiguration.URI_QUERY.equals(anno.parameter()) ? anno.parameter() : anno.component());
            map.put(key, field);
        }

        // Log standard URI components and remove them from the map
        logConfigurationField(config, map, EndpointConfiguration.URI_SCHEME, true);
View Full Code Here

        Field[] fields = clazz.getDeclaredFields();
       
        // Put the Fields in a Map first for a prettier print
        Map<String, Field> map = new HashMap<String, Field>();

        URIField anno = null;
        for (final Field field : fields) {
            anno = field.getAnnotation(URIField.class);
            String key = anno == null ? field.getName()
                : (EndpointConfiguration.URI_QUERY.equals(anno.parameter()) ? anno.parameter() : anno.component());
            map.put(key, field);
        }

        // Log standard URI components and remove them from the map
        logConfigurationField(config, map, EndpointConfiguration.URI_SCHEME, true);
View Full Code Here

TOP

Related Classes of org.apache.camel.URIField

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.