Examples of JavaImplementation


Examples of org.apache.tuscany.sca.implementation.java.JavaImplementation

        assertEquals(2, type.getReferences().size());
        assertEquals(0, type.getProperties().size());
    }

    public void testParentInterface() throws IntrospectionException, NoSuchMethodException {
        JavaImplementation type = javaImplementationFactory.createJavaImplementation();
        Constructor<Child> ctor = Child.class.getConstructor();
        type.setConstructor(new JavaConstructorImpl<Child>(ctor));
        processor.visitEnd(Child.class, type);
        assertNotNull(ModelHelper.getService(type, Interface1.class.getSimpleName()));
    }
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.java.JavaImplementation

    /**
     * Verifies a service inteface is calculated when only props and refs are
     * given
     */
    public void testExcludedPropertyAndReference() throws Exception {
        JavaImplementation type = javaImplementationFactory.createJavaImplementation();
        org.apache.tuscany.sca.assembly.Reference ref = factory.createReference();
        ref.setName("reference");
        type.getReferences().add(ref);
        type.getReferenceMembers().put("reference", new JavaElementImpl("reference", Ref.class, null));
        org.apache.tuscany.sca.assembly.Reference ref2 = factory.createReference();
        ref2.setName("reference2");
        type.getReferences().add(ref2);
        type.getReferenceMembers().put("reference2", new JavaElementImpl("reference2", Ref.class, null));
        org.apache.tuscany.sca.assembly.Property prop1 = factory.createProperty();
        prop1.setName("string1");
        type.getProperties().add(prop1);
        type.getPropertyMembers().put("string1", new JavaElementImpl("string1", String.class, null));
        org.apache.tuscany.sca.assembly.Property prop2 = factory.createProperty();
        prop2.setName("string2");
        type.getProperties().add(prop2);
        type.getPropertyMembers().put("string2", new JavaElementImpl("string2", String.class, null));
        visitEnd(MockService.class, type);
        assertEquals(1, type.getServices().size());
    }
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.