Package org.switchyard.transform

Examples of org.switchyard.transform.BaseTransformer


        return false;
    }

    private static Transformer newTransformer(final Object transformerObject, final Method publicMethod, QName from, QName to) {
        Transformer transformer = new BaseTransformer(from, to) {
            @Override
            public Object transform(Object from) {
                try {
                    return publicMethod.invoke(transformerObject, from);
                } catch (InvocationTargetException e) {
View Full Code Here


    }

    @Test
    public void testGetName_default_without_generics() {
        // No generics...
        BaseTransformer intToStr =
            new BaseTransformer() {
                public Object transform(Object from) {
                    return null;
                }
        };

        Assert.assertEquals("java:java.lang.Object", intToStr.getFrom().toString());
        Assert.assertEquals("java:java.lang.Object", intToStr.getTo().toString());
    }
View Full Code Here

    @Test
    public void testGetName_specified_without_generics() {
        final QName fromName = new QName("string1");
        final QName toName = new QName("string2");

        BaseTransformer intToStr =
            new BaseTransformer(fromName, toName) {
                public Object transform(Object from) {
                    return null;
                }
        };

        Assert.assertEquals(fromName, intToStr.getFrom());
        Assert.assertEquals(toName, intToStr.getTo());
    }
View Full Code Here

        Assert.assertFalse(resolved);
    }
   
    @SuppressWarnings("rawtypes")
    Transformer createTransformer(QName from, QName to) {
        return new BaseTransformer(from, to) {
            public Object transform(Object from) {
                return null;
            }
        };
    }
View Full Code Here

TOP

Related Classes of org.switchyard.transform.BaseTransformer

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.