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

Examples of org.apache.tuscany.sca.implementation.java.introspect.JavaClassVisitor


*/
public class JavaClassIntrospectorImplTestCase extends TestCase {

    public void testRegister() throws Exception {
        JavaImplementationFactory factory = new DefaultJavaImplementationFactory();
        JavaClassVisitor extension = EasyMock.createNiceMock(JavaClassVisitor.class);
        factory.addClassVisitor(extension);
    }
View Full Code Here


        factory.addClassVisitor(extension);
    }

    public void testUnegister() throws Exception {
        JavaImplementationFactory factory = new DefaultJavaImplementationFactory();
        JavaClassVisitor extension = EasyMock.createNiceMock(JavaClassVisitor.class);
        factory.addClassVisitor(extension);
        factory.removeClassVisitor(extension);
    }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    public void testWalk() throws Exception {
        JavaImplementationFactory factory = new DefaultJavaImplementationFactory();
        JavaClassVisitor extension = EasyMock.createMock(JavaClassVisitor.class);
        extension.visitClass(EasyMock.eq(Bar.class), EasyMock.isA(JavaImplementation.class));
        extension.visitConstructor(EasyMock.isA(Constructor.class), EasyMock.isA(JavaImplementation.class));
        extension.visitMethod(EasyMock.isA(Method.class), EasyMock.isA(JavaImplementation.class));
        extension.visitField(EasyMock.isA(Field.class), EasyMock.isA(JavaImplementation.class));
        extension.visitSuperClass(EasyMock.isA(Class.class), EasyMock.isA(JavaImplementation.class));
        extension.visitEnd(EasyMock.isA(Class.class), EasyMock.isA(JavaImplementation.class));

        // mock.expects(once()).method("visitClass");
        // mock.expects(once()).method("visitMethod");
        // mock.expects(once()).method("visitField");
        // mock.expects(once()).method("visitConstructor");
View Full Code Here

            throw new IllegalStateException(e);
        }
       
        // Load data bindings
        for (ServiceDeclaration visitorDeclaration: visitorDeclarations) {
            JavaClassVisitor visitor = null;
            try {
                Class<JavaClassVisitor> visitorClass = (Class<JavaClassVisitor>)visitorDeclaration.loadClass();
               
                try {
                    Constructor<JavaClassVisitor> constructor = visitorClass.getConstructor(ExtensionPointRegistry.class);
View Full Code Here

            throw new IllegalStateException(e);
        }
       
        // Load data bindings
        for (ServiceDeclaration visitorDeclaration: visitorDeclarations) {
            JavaClassVisitor visitor = null;
            try {
                Class<JavaClassVisitor> visitorClass = (Class<JavaClassVisitor>)visitorDeclaration.loadClass();
               
                try {
                    Constructor<JavaClassVisitor> constructor = visitorClass.getConstructor(ExtensionPointRegistry.class);
View Full Code Here

*/
public class JavaClassIntrospectorImplTestCase extends TestCase {

    public void testRegister() throws Exception {
        JavaImplementationFactory factory = new DefaultJavaImplementationFactory();
        JavaClassVisitor extension = EasyMock.createNiceMock(JavaClassVisitor.class);
        factory.addClassVisitor(extension);
    }
View Full Code Here

        factory.addClassVisitor(extension);
    }

    public void testUnegister() throws Exception {
        JavaImplementationFactory factory = new DefaultJavaImplementationFactory();
        JavaClassVisitor extension = EasyMock.createNiceMock(JavaClassVisitor.class);
        factory.addClassVisitor(extension);
        factory.removeClassVisitor(extension);
    }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    public void testWalk() throws Exception {
        JavaImplementationFactory factory = new DefaultJavaImplementationFactory();
        JavaClassVisitor extension = EasyMock.createMock(JavaClassVisitor.class);
        extension.visitClass(EasyMock.eq(Bar.class), EasyMock.isA(JavaImplementation.class));
        extension.visitConstructor(EasyMock.isA(Constructor.class), EasyMock.isA(JavaImplementation.class));
        extension.visitMethod(EasyMock.isA(Method.class), EasyMock.isA(JavaImplementation.class));
        extension.visitField(EasyMock.isA(Field.class), EasyMock.isA(JavaImplementation.class));
        extension.visitSuperClass(EasyMock.isA(Class.class), EasyMock.isA(JavaImplementation.class));
        extension.visitEnd(EasyMock.isA(Class.class), EasyMock.isA(JavaImplementation.class));

        // mock.expects(once()).method("visitClass");
        // mock.expects(once()).method("visitMethod");
        // mock.expects(once()).method("visitField");
        // mock.expects(once()).method("visitConstructor");
View Full Code Here

            throw new IllegalStateException(e);
        }
       
        // Load data bindings
        for (ServiceDeclaration visitorDeclaration: visitorDeclarations) {
            JavaClassVisitor visitor = null;
            try {
                Class<JavaClassVisitor> visitorClass = (Class<JavaClassVisitor>)visitorDeclaration.loadClass();
               
                try {
                    Constructor<JavaClassVisitor> constructor = visitorClass.getConstructor(ExtensionPointRegistry.class);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.implementation.java.introspect.JavaClassVisitor

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.