Package org.apache.tuscany.sca.databinding.annotation

Examples of org.apache.tuscany.sca.databinding.annotation.DataBinding


        processInterface(javaInterface, operations);
    }

    private void processInterface(JavaInterface javaInterface, List<Operation> operations) {
        Class<?> clazz = javaInterface.getJavaClass();
        DataBinding dataBinding = clazz.getAnnotation(DataBinding.class);
        String dataBindingId = null;
        boolean wrapperStyle = false;
        if (dataBinding != null) {
            dataBindingId = dataBinding.value();
            wrapperStyle = dataBinding.wrapped();
        }

        Map<String, Operation> opMap = new HashMap<String, Operation>();
        for (Operation op : javaInterface.getOperations()) {
            opMap.put(op.getName(), op);
            // In the case of @WebMethod, the method name can be different from the operation name
            if (op instanceof JavaOperation) {
                opMap.put(((JavaOperation)op).getJavaMethod().getName(), op);
            }
            if (dataBindingId != null) {
                op.setDataBinding(dataBindingId);
                op.setWrapperStyle(wrapperStyle);
            }
        }
        for (Method method : clazz.getMethods()) {
            if (method.getDeclaringClass() == Object.class) {
                continue;
            }
            Operation operation = opMap.get(method.getName());
            DataBinding methodDataBinding = clazz.getAnnotation(DataBinding.class);
            if (methodDataBinding == null) {
                methodDataBinding = dataBinding;
            }
            dataBindingId = null;
            wrapperStyle = false;
View Full Code Here


        processInterface(javaInterface, operations);
    }

    private void processInterface(JavaInterface javaInterface, List<Operation> operations) {
        Class<?> clazz = javaInterface.getJavaClass();
        DataBinding dataBinding = clazz.getAnnotation(DataBinding.class);
        String dataBindingId = null;
        boolean wrapperStyle = false;
        if (dataBinding != null) {
            dataBindingId = dataBinding.value();
            wrapperStyle = dataBinding.wrapped();
        }

        for (Operation op : javaInterface.getOperations()) {
            JavaOperation operation = (JavaOperation) op;
            // In the case of @WebMethod, the method name can be different from the operation name

            if (dataBindingId != null) {
                op.setDataBinding(dataBindingId);
                op.setWrapperStyle(wrapperStyle);
            }

            Method method = operation.getJavaMethod();

            DataBinding methodDataBinding = clazz.getAnnotation(DataBinding.class);
            if (methodDataBinding == null) {
                methodDataBinding = dataBinding;
            }
            dataBindingId = null;
            wrapperStyle = false;
View Full Code Here

        processInterface(javaInterface, operations);
    }

    private void processInterface(JavaInterface javaInterface, List<Operation> operations) {
        Class<?> clazz = javaInterface.getJavaClass();
        DataBinding dataBinding = clazz.getAnnotation(DataBinding.class);
        String dataBindingId = null;
        boolean wrapperStyle = false;
        if (dataBinding != null) {
            dataBindingId = dataBinding.value();
            wrapperStyle = dataBinding.wrapped();
        }

        Map<String, Operation> opMap = new HashMap<String, Operation>();
        for (Operation op : javaInterface.getOperations()) {
            opMap.put(op.getName(), op);
            // In the case of @WebMethod, the method name can be different from the operation name
            if (op instanceof JavaOperation) {
                opMap.put(((JavaOperation)op).getJavaMethod().getName(), op);
            }
            if (dataBindingId != null) {
                op.setDataBinding(dataBindingId);
                op.setWrapperStyle(wrapperStyle);
            }
        }
        for (Method method : clazz.getMethods()) {
            if (method.getDeclaringClass() == Object.class) {
                continue;
            }
            Operation operation = opMap.get(method.getName());
            if (operation == null) { // @WebMethod exclude=true
                continue;
            }
            DataBinding methodDataBinding = clazz.getAnnotation(DataBinding.class);
            if (methodDataBinding == null) {
                methodDataBinding = dataBinding;
            }
            dataBindingId = null;
            wrapperStyle = false;
View Full Code Here

*/
public class DataBindingTestCase {
    @org.junit.Test
    public void testDataType() throws Exception {
        Class<Test> testClass = Test.class;
        DataBinding d = testClass.getAnnotation(DataBinding.class);
        assertEquals(d.value(), "sdo");

        Method method = testClass.getMethod("test", new Class[] {Object.class});
        DataBinding d2 = method.getAnnotation(DataBinding.class);
        assertEquals(d2.value(), "jaxb");
    }
View Full Code Here

        processInterface(javaInterface, operations);
    }

    private void processInterface(JavaInterface javaInterface, List<Operation> operations) {
        Class<?> clazz = javaInterface.getJavaClass();
        DataBinding dataBinding = clazz.getAnnotation(DataBinding.class);
        String dataBindingId = null;
        boolean wrapperStyle = false;
        if (dataBinding != null) {
            dataBindingId = dataBinding.value();
            wrapperStyle = dataBinding.wrapped();
        }

        Map<String, Operation> opMap = new HashMap<String, Operation>();
        for (Operation op : javaInterface.getOperations()) {
            opMap.put(op.getName(), op);
            // In the case of @WebMethod, the method name can be different from the operation name
            if (op instanceof JavaOperation) {
                opMap.put(((JavaOperation)op).getJavaMethod().getName(), op);
            }
            if (dataBindingId != null) {
                op.setDataBinding(dataBindingId);
                op.setWrapperStyle(wrapperStyle);
            }
        }
        for (Method method : clazz.getMethods()) {
            if (method.getDeclaringClass() == Object.class) {
                continue;
            }
            Operation operation = opMap.get(method.getName());
            if (operation == null) { // @WebMethod exclude=true
                continue;
            }
            DataBinding methodDataBinding = clazz.getAnnotation(DataBinding.class);
            if (methodDataBinding == null) {
                methodDataBinding = dataBinding;
            }
            dataBindingId = null;
            wrapperStyle = false;
View Full Code Here

*/
public class DataBindingTestCase {
    @org.junit.Test
    public void testDataType() throws Exception {
        Class<Test> testClass = Test.class;
        DataBinding d = testClass.getAnnotation(DataBinding.class);
        assertEquals(d.value(), "sdo");

        Method method = testClass.getMethod("test", new Class[] {Object.class});
        DataBinding d2 = method.getAnnotation(DataBinding.class);
        assertEquals(d2.value(), "jaxb");
    }
View Full Code Here

        processInterface(javaInterface, operations);
    }

    private void processInterface(JavaInterface javaInterface, List<Operation> operations) {
        Class<?> clazz = javaInterface.getJavaClass();
        DataBinding dataBinding = clazz.getAnnotation(DataBinding.class);
        String dataBindingId = null;
        boolean wrapperStyle = false;
        if (dataBinding != null) {
            dataBindingId = dataBinding.value();
            wrapperStyle = dataBinding.wrapped();
        }

        for (Operation op : javaInterface.getOperations()) {
            JavaOperation operation = (JavaOperation) op;
            // In the case of @WebMethod, the method name can be different from the operation name

            if (dataBindingId != null) {
                op.setDataBinding(dataBindingId);
                op.setWrapperStyle(wrapperStyle);
            }

            Method method = operation.getJavaMethod();

            DataBinding methodDataBinding = clazz.getAnnotation(DataBinding.class);
            if (methodDataBinding == null) {
                methodDataBinding = dataBinding;
            }
            dataBindingId = null;
            wrapperStyle = false;
View Full Code Here

        processInterface(javaInterface, operations);
    }

    private void processInterface(JavaInterface javaInterface, List<Operation> operations) {
        Class<?> clazz = javaInterface.getJavaClass();
        DataBinding dataBinding = clazz.getAnnotation(DataBinding.class);
        String dataBindingId = null;
        boolean wrapperStyle = false;
        if (dataBinding != null) {
            dataBindingId = dataBinding.value();
            wrapperStyle = dataBinding.wrapped();
        }

        Map<String, Operation> opMap = new HashMap<String, Operation>();
        for (Operation op : javaInterface.getOperations()) {
            opMap.put(op.getName(), op);
            // In the case of @WebMethod, the method name can be different from the operation name
            if (op instanceof JavaOperation) {
                opMap.put(((JavaOperation)op).getJavaMethod().getName(), op);
            }
            if (dataBindingId != null) {
                op.setDataBinding(dataBindingId);
                op.setWrapperStyle(wrapperStyle);
            }
        }
        for (Method method : clazz.getMethods()) {
            if (method.getDeclaringClass() == Object.class) {
                continue;
            }
            Operation operation = opMap.get(method.getName());
            DataBinding methodDataBinding = clazz.getAnnotation(DataBinding.class);
            if (methodDataBinding == null) {
                methodDataBinding = dataBinding;
            }
            dataBindingId = null;
            wrapperStyle = false;
View Full Code Here

        processInterface(javaInterface, operations);
    }

    private void processInterface(JavaInterface javaInterface, List<Operation> operations) {
        Class<?> clazz = javaInterface.getJavaClass();
        DataBinding dataBinding = clazz.getAnnotation(DataBinding.class);
        String dataBindingId = null;
        boolean wrapperStyle = false;
        if (dataBinding != null) {
            dataBindingId = dataBinding.value();
            wrapperStyle = dataBinding.wrapped();
        }

        Map<String, Operation> opMap = new HashMap<String, Operation>();
        for (Operation op : javaInterface.getOperations()) {
            opMap.put(op.getName(), op);
            // In the case of @WebMethod, the method name can be different from the operation name
            if (op instanceof JavaOperation) {
                opMap.put(((JavaOperation)op).getJavaMethod().getName(), op);
            }
            if (dataBindingId != null) {
                op.setDataBinding(dataBindingId);
                op.setInputWrapperStyle(wrapperStyle);
                op.setOutputWrapperStyle(wrapperStyle);
            }
        }
        for (Method method : clazz.getMethods()) {
            if (method.getDeclaringClass() == Object.class) {
                continue;
            }
            Operation operation = opMap.get(method.getName());
            if (operation == null) { // @WebMethod exclude=true
                continue;
            }
            DataBinding methodDataBinding = clazz.getAnnotation(DataBinding.class);
            if (methodDataBinding == null) {
                methodDataBinding = dataBinding;
            }
            dataBindingId = null;
            wrapperStyle = false;
View Full Code Here

*/
public class DataBindingTestCase extends TestCase {
    @SuppressWarnings("unused")
    public void testDataType() throws Exception {
        Class<Test> testClass = Test.class;
        DataBinding d = testClass.getAnnotation(DataBinding.class);
        Assert.assertEquals(d.value(), "sdo");

        Method method = testClass.getMethod("test", new Class[] {Object.class});
        DataBinding d2 = method.getAnnotation(DataBinding.class);
        Assert.assertEquals(d2.value(), "jaxb");
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.databinding.annotation.DataBinding

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.