Package org.apache.cxf.common.util

Examples of org.apache.cxf.common.util.ASMHelper


       
        int ints[] = port.echoIntArray(new int[] {1, 2 , 3}, null);
        assertEquals(3, ints.length);
        assertEquals(1, ints[0]);

        if (new ASMHelper().createClassWriter() != null) {
            //doing the type adapter things and such really
            //requires the ASM generated helper classes
            assertEquals("Val", port.createBar("Val").getName());
        }
        testExceptionCases(port);
View Full Code Here


       
        int ints[] = port.echoIntArray(new int[] {1, 2 , 3}, null);
        assertEquals(3, ints.length);
        assertEquals(1, ints[0]);

        if (new ASMHelper().createClassWriter() != null) {
            //doing the type adapter things and such really
            //requires the ASM generated helper classes
            assertEquals("Val", port.createBar("Val").getName());
        }
        testExceptionCases(port);
View Full Code Here

        }
        return false;
    }
   
    private static synchronized Object createNamespaceWrapper(Map<String, String> map) {
        ASMHelper helper = new ASMHelper();
        String className = "org.apache.cxf.jaxb.NamespaceMapperInternal";
        Class<?> cls = helper.findClass(className, JAXBUtils.class);
        if (cls == null) {
            ClassWriter cw = helper.createClassWriter();
            if (cw == null) {
                return null;
            }
            cls = createNamespaceWrapperInternal(helper, cw);
        }
View Full Code Here

    private static synchronized void createFixedAnyConstructor() {
        if (fixedAnyConstructor != null) {
            return;
        }
       
        ASMHelper helper = new ASMHelper();
        ClassWriter cw = helper.createClassWriter();
        FieldVisitor fv;

        cw.visit(Opcodes.V1_5, Opcodes.ACC_PUBLIC + Opcodes.ACC_SUPER,
                 "org/apache/cxf/binding/corba/utils/FixedAnyImpl",
                 null, "com/sun/corba/se/impl/corba/AnyImpl", null);

        cw.visitSource("FixedAnyImpl.java", null);

        fv = cw.visitField(0, "obj", "Lorg/omg/CORBA/portable/Streamable;", null, null);
        fv.visitEnd();
        addFixedAnyConstructor(helper, cw);
        addInsertOverride(helper, cw);
        addExtractOverride(helper, cw);
        addReadOverride(helper, cw);
        addWriteOverride(helper, cw);
       
        cw.visitEnd();

        byte[] b = cw.toByteArray();
        Class<?> c = helper.loadClass("org.apache.cxf.binding.corba.utils.FixedAnyImpl",
                                      CorbaAnyHelper.class, b);
        try {
            fixedAnyConstructor = c.getConstructor(ORB.class, Any.class);
        } catch (Exception e) {
            //shouldn't happen since we generated that constructor
View Full Code Here

TOP

Related Classes of org.apache.cxf.common.util.ASMHelper

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.