Package org.apache.tuscany.sca.interfacedef.java.introspect

Examples of org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor


        assertEquals(IOException.class, fault0.getPhysical());
        assertEquals(IOException.class, fault0.getLogical());
    }

    public void testUnregister() throws Exception {
        JavaInterfaceVisitor extension = createMock(JavaInterfaceVisitor.class);
        extension.visitInterface(EasyMock.isA(JavaInterface.class));
        expectLastCall().once();
        replay(extension);
        visitors.addInterfaceVisitor(extension);
        impl.introspect(Base.class);
        visitors.removeInterfaceVisitor(extension);
View Full Code Here


            throw new IllegalStateException(e);
        }
       
        // Load data bindings
        for (ServiceDeclaration visitorDeclaration: visitorDeclarations) {
            JavaInterfaceVisitor visitor;
            try {
                Class<JavaInterfaceVisitor> visitorClass = (Class<JavaInterfaceVisitor>)visitorDeclaration.loadClass();
                visitor = visitorClass.newInstance();
            } catch (ClassNotFoundException e) {
                throw new IllegalArgumentException(e);
View Full Code Here

        assertEquals(IOException.class, fault0.getPhysical());
        assertEquals(IOException.class, fault0.getLogical());
    }

    public void testUnregister() throws Exception {
        JavaInterfaceVisitor extension = createMock(JavaInterfaceVisitor.class);
        extension.visitInterface(EasyMock.isA(JavaInterface.class));
        expectLastCall().once();
        replay(extension);
        factory.addInterfaceVisitor(extension);
        factory.createJavaInterface(Base.class);
        factory.removeInterfaceVisitor(extension);
View Full Code Here

            throw new IllegalStateException(e);
        }
       
        // Load data bindings
        for (ServiceDeclaration visitorDeclaration: visitorDeclarations) {
            JavaInterfaceVisitor visitor;
            try {
                Class<JavaInterfaceVisitor> visitorClass = (Class<JavaInterfaceVisitor>)visitorDeclaration.loadClass();
                visitor = visitorClass.newInstance();
            } catch (ClassNotFoundException e) {
                throw new IllegalArgumentException(e);
View Full Code Here

            throw new IllegalStateException(e);
        }
       
        // Load data bindings
        for (ServiceDeclaration visitorDeclaration: visitorDeclarations) {
            JavaInterfaceVisitor visitor;
            try {
                Class<JavaInterfaceVisitor> visitorClass = (Class<JavaInterfaceVisitor>)visitorDeclaration.loadClass();
                visitor = visitorClass.newInstance();
            } catch (ClassNotFoundException e) {
                throw new IllegalArgumentException(e);
View Full Code Here

        assertEquals(IOException.class, fault0.getPhysical());
        assertEquals(IOException.class, fault0.getLogical());
    }

    public void testUnregister() throws Exception {
        JavaInterfaceVisitor extension = createMock(JavaInterfaceVisitor.class);
        extension.visitInterface(EasyMock.isA(JavaInterface.class));
        expectLastCall().once();
        replay(extension);
        visitors.addInterfaceVisitor(extension);
        impl.introspect(Base.class);
        visitors.removeInterfaceVisitor(extension);
View Full Code Here

        element = new QName("http://impl.introspection.java.interfacedef.sca.tuscany.apache.org/", "IOException");
        assertEquals(element, fault0.getLogical().getElementName());
    }

    public void testUnregister() throws Exception {
        JavaInterfaceVisitor extension = createMock(JavaInterfaceVisitor.class);
        extension.visitInterface(EasyMock.isA(JavaInterface.class));
        expectLastCall().once();
        replay(extension);
        factory.addInterfaceVisitor(extension);
        factory.createJavaInterface(Base.class);
        factory.removeInterfaceVisitor(extension);
View Full Code Here

            throw new IllegalStateException(e);
        }
       
        // Load data bindings
        for (String visitorDeclaration: visitorDeclarations) {
            JavaInterfaceVisitor visitor;
            try {
                Class<JavaInterfaceVisitor> visitorClass = (Class<JavaInterfaceVisitor>)Class.forName(visitorDeclaration, true, classLoader);
                visitor = visitorClass.newInstance();
            } catch (ClassNotFoundException e) {
                throw new IllegalArgumentException(e);
View Full Code Here

            throw new IllegalStateException(e);
        }
       
        // Load data bindings
        for (ServiceDeclaration visitorDeclaration: visitorDeclarations) {
            JavaInterfaceVisitor visitor;
            try {
                Class<JavaInterfaceVisitor> visitorClass = (Class<JavaInterfaceVisitor>)visitorDeclaration.loadClass();
                visitor = visitorClass.newInstance();
            } catch (ClassNotFoundException e) {
                throw new IllegalArgumentException(e);
View Full Code Here

            throw new IllegalStateException(e);
        }
       
        // Load data bindings
        for (ServiceDeclaration visitorDeclaration: visitorDeclarations) {
            JavaInterfaceVisitor visitor = null;
            try {
                Class<JavaInterfaceVisitor> visitorClass = (Class<JavaInterfaceVisitor>)visitorDeclaration.loadClass();
               
                try {
                    Constructor<JavaInterfaceVisitor> constructor = visitorClass.getConstructor(ExtensionPointRegistry.class);
                    visitor = constructor.newInstance(registry);
                } catch (NoSuchMethodException e) {
                    visitor = visitorClass.newInstance();
                }
               
               
            } catch (Exception e) {
                IllegalStateException ie = new IllegalStateException(e);
                throw ie;
            }
           
            logger.fine("Adding Java Interface visitor: " + visitor.getClass().getName());
           
            addInterfaceVisitor(visitor);
        }
       
        loadedVisitors = true;
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor

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.