Examples of DefaultTypeConverter


Examples of org.apache.camel.impl.converter.DefaultTypeConverter

    protected TypeConverter createTypeConverter() {
        BaseTypeConverterRegistry answer;
        if (isLazyLoadTypeConverters()) {
            answer = new LazyLoadingTypeConverter(packageScanClassResolver, getInjector(), getDefaultFactoryFinder());
        } else {
            answer = new DefaultTypeConverter(packageScanClassResolver, getInjector(), getDefaultFactoryFinder());
        }
        setTypeConverterRegistry(answer);
        return answer;
    }
View Full Code Here

Examples of org.apache.camel.impl.converter.DefaultTypeConverter

        // helper class
    }
   
    public static DefaultTypeConverter createTypeConverter(DefaultCamelContext context) {
       
        DefaultTypeConverter answer = new DefaultTypeConverter(context.getPackageScanClassResolver(), context.getInjector(), context.getDefaultFactoryFinder());
        List<TypeConverterLoader> typeConverterLoaders = answer.getTypeConverterLoaders();

        // Remove the AnnotationTypeConverterLoader
        TypeConverterLoader atLoader = null;
        for (TypeConverterLoader loader : typeConverterLoaders) {
            if (loader instanceof AnnotationTypeConverterLoader) {
View Full Code Here

Examples of org.apache.camel.impl.converter.DefaultTypeConverter

    /**
     * Lazily create a default implementation
     */
    protected TypeConverter createTypeConverter() {
        DefaultTypeConverter answer = new DefaultTypeConverter(packageScanClassResolver, getInjector(), getDefaultFactoryFinder());
        typeConverterRegistry = answer;
        return answer;
    }
View Full Code Here

Examples of org.apache.camel.impl.converter.DefaultTypeConverter

    }

    protected DefaultTypeConverter createRegistry() {
        // base the osgi type converter on the default type converter
        // TODO: Why is it based on the DefaultPackageScanClassResolver and not OsgiPackageScanClassResolver?
        DefaultTypeConverter reg = new DefaultTypeConverter(new DefaultPackageScanClassResolver() {
            @Override
            public Set<ClassLoader> getClassLoaders() {
                return Collections.emptySet();
            }
        }, injector, null);
View Full Code Here

Examples of org.apache.camel.impl.converter.DefaultTypeConverter

    protected TypeConverter createTypeConverter() {
        BaseTypeConverterRegistry answer;
        if (isLazyLoadTypeConverters()) {
            answer = new LazyLoadingTypeConverter(packageScanClassResolver, getInjector(), getDefaultFactoryFinder());
        } else {
            answer = new DefaultTypeConverter(packageScanClassResolver, getInjector(), getDefaultFactoryFinder());
        }
        setTypeConverterRegistry(answer);
        return answer;
    }
View Full Code Here

Examples of org.apache.camel.impl.converter.DefaultTypeConverter

    protected TypeConverter createTypeConverter() {
        BaseTypeConverterRegistry answer;
        if (isLazyLoadTypeConverters()) {
            answer = new LazyLoadingTypeConverter(packageScanClassResolver, getInjector(), getDefaultFactoryFinder());
        } else {
            answer = new DefaultTypeConverter(packageScanClassResolver, getInjector(), getDefaultFactoryFinder());
        }
        setTypeConverterRegistry(answer);
        return answer;
    }
View Full Code Here

Examples of org.apache.camel.impl.converter.DefaultTypeConverter

        return delegate;
    }

    protected DefaultTypeConverter createRegistry() {
        // base the osgi type converter on the default type converter
        DefaultTypeConverter answer = new DefaultTypeConverter(new DefaultPackageScanClassResolver() {
            @Override
            public Set<ClassLoader> getClassLoaders() {
                // we don't need any classloaders as we use osgi service tracker instead
                return Collections.emptySet();
            }
        }, injector, factoryFinder);

        try {
            // only load the core type converters, as osgi activator will keep track on bundles
            // being installed/uninstalled and load type converters as part of that process
            answer.loadCoreTypeConverters();
        } catch (Exception e) {
            throw new RuntimeCamelException("Error loading CoreTypeConverter due: " + e.getMessage(), e);
        }

        // load the type converters the tracker has been tracking
View Full Code Here

Examples of org.apache.camel.impl.converter.DefaultTypeConverter

    protected TypeConverter createTypeConverter() {
        BaseTypeConverterRegistry answer;
        if (isLazyLoadTypeConverters()) {
            answer = new LazyLoadingTypeConverter(packageScanClassResolver, getInjector(), getDefaultFactoryFinder());
        } else {
            answer = new DefaultTypeConverter(packageScanClassResolver, getInjector(), getDefaultFactoryFinder());
        }
        setTypeConverterRegistry(answer);
        return answer;
    }
View Full Code Here

Examples of org.apache.camel.impl.converter.DefaultTypeConverter

    /**
     * Lazily create a default implementation
     */
    protected TypeConverter createTypeConverter() {
        DefaultTypeConverter answer = new DefaultTypeConverter(packageScanClassResolver, getInjector(), getDefaultFactoryFinder());
        typeConverterRegistry = answer;
        return answer;
    }
View Full Code Here

Examples of org.apache.camel.impl.converter.DefaultTypeConverter

        this.type = type;
    }

    public Map<String, TypeConverter> getConverters() {
        Map<String, TypeConverter> answer = new TreeMap<String, TypeConverter>();
        DefaultTypeConverter converter = getDefaultTypeConverter();
        if (converter != null) {
            Map<Class<?>, TypeConverter> classes = converter.getToClassMappings(type);
            for (Map.Entry<Class<?>, TypeConverter> entry : classes.entrySet()) {
                Class<?> aClass = entry.getKey();
                String name = ConvertersResource.nameOf(aClass);
                answer.put(name, entry.getValue());
            }
View Full Code Here
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.