Package org.apache.camel.impl

Examples of org.apache.camel.impl.DefaultPackageScanClassResolver


    @Before
    public void init() throws Exception {

        // Set factory
        PackageScanClassResolver res = new DefaultPackageScanClassResolver();
        factory = new BindyKeyValuePairFactory(res, "org.apache.camel.dataformat.bindy.model.fix.complex.onetomany");

        // Set model class
        models.add(org.apache.camel.dataformat.bindy.model.fix.complex.onetomany.Order.class);
        models.add(org.apache.camel.dataformat.bindy.model.fix.complex.onetomany.Header.class);
View Full Code Here


public class AnnotationModuleLoaderTest extends Assert {

    @Test
    public void testLoadModels() throws Exception {
        AnnotationModelLoader loader = new AnnotationModelLoader(new DefaultPackageScanClassResolver());
        Set<Class<?>> classes = loader.loadModels("org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink");
        assertNotNull("The find classes should not be null ", classes);
        assertEquals("There should have 3 classes", 3, classes.size());
        assertTrue(classes.contains(Client.class));
        assertTrue(classes.contains(Order.class));
View Full Code Here

    @Before
    public void init() throws Exception {

        // Set factory
        PackageScanClassResolver res = new DefaultPackageScanClassResolver();
        factory = new BindyKeyValuePairFactory(res, "org.apache.camel.dataformat.bindy.model.fix.complex.onetomany");

        // Set model class
        models.add(org.apache.camel.dataformat.bindy.model.fix.complex.onetomany.Order.class);
        models.add(org.apache.camel.dataformat.bindy.model.fix.complex.onetomany.Header.class);
View Full Code Here

    @Before
    public void init() throws Exception {

        // Set factory
        PackageScanClassResolver res = new DefaultPackageScanClassResolver();
        factory = new BindyKeyValuePairFactory(res, "org.apache.camel.dataformat.bindy.model.fix.complex.onetomany");

        // Set model class
        models.add(org.apache.camel.dataformat.bindy.model.fix.complex.onetomany.Order.class);
        models.add(org.apache.camel.dataformat.bindy.model.fix.complex.onetomany.Header.class);
View Full Code Here

            EmbeddedMojo mojo = new EmbeddedMojo();
            mojo.setClasspathElements(list);
            ClassLoader newClassLoader = mojo.createClassLoader(oldClassLoader);
            Thread.currentThread().setContextClassLoader(newClassLoader);

            ReportingTypeConverterLoader loader = new ReportingTypeConverterLoader(new DefaultPackageScanClassResolver());
            ReportingTypeConverterRegistry registry = new ReportingTypeConverterRegistry();
            loader.load(registry);
            getLog().error("FOUND type mapping; count = " + loader.getTypeConversions().length);

            String[] errors = registry.getErrors();
View Full Code Here

public class AnnotationModuleLoaderTest extends Assert {
   
    @Test
    public void testLoadModels() throws Exception {
        AnnotationModelLoader loader = new AnnotationModelLoader(new DefaultPackageScanClassResolver());
        Set<Class> classes = loader.loadModels("org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink");
        assertNotNull("The find classes should not be null ", classes);
        assertEquals("There should have 3 classes", 3, classes.size());
        assertTrue(classes.contains(Client.class));
        assertTrue(classes.contains(Order.class));
View Full Code Here

    private Set<Class<? extends Annotation>> annotations = new HashSet<Class<? extends Annotation>>();
    private String scanPackage = "org.apache.camel.impl.scan.test";

    public void setUp() throws Exception {
        super.setUp();
        resolver = new DefaultPackageScanClassResolver();
        annotations.add(ScannableOne.class);
        annotations.add(ScannableTwo.class);
    }
View Full Code Here

    protected TypeConverter converter;

    @Before
    public void init() throws Exception {
        converter = new DefaultTypeConverter(new DefaultPackageScanClassResolver(),
                new ReflectionInjector(), new DefaultFactoryFinderResolver().resolveDefaultFactoryFinder(new DefaultClassResolver()));
        ServiceHelper.startService(converter);
    }
View Full Code Here

        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();
            }
View Full Code Here

    protected AbstractXmlApplicationContext createApplicationContext() {
        return new ClassPathXmlApplicationContext("org/apache/camel/spring/config/PackageResolverTest.xml");
    }

    public void testSetAcceptableSchema() throws Exception {
        DefaultPackageScanClassResolver resolver = (DefaultPackageScanClassResolver)context.getPackageScanClassResolver();
        assertNotNull(resolver);
        // just check the accept schema
        assertTrue("We should accept the test:!", resolver.isAcceptableScheme("test://test"));
        assertTrue("We should accept the test2:!", resolver.isAcceptableScheme("test2://test"));
       
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.impl.DefaultPackageScanClassResolver

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.