Package org.jibx.binding.classes

Examples of org.jibx.binding.classes.ContextMethodBuilder.loadContext()


        // generate name comparison unless an abstract mapping
        if (hasname) {
           
            // test if at defined element name
            mb.addException(MethodBuilder.FRAMEWORK_EXCEPTION_CLASS);
            mb.loadContext();
            m_name.genPushUriPair(mb);
            mb.appendCallInterface(UNMARSHAL_ISATMETHOD,
                UNMARSHAL_ISATSIGNATURE);
        }
       
View Full Code Here


            mb.addException(MethodBuilder.FRAMEWORK_EXCEPTION_CLASS);
            BranchWrapper[] iffounds =
                new BranchWrapper[m_extensions.size()];
            for (int i = 0; i < iffounds.length; i++) {
                IMapping map = (IMapping)m_extensions.get(i);
                mb.loadContext();
                mb.appendLoadConstant(map.getMappingName());
                mb.appendCallInterface(GETUNMARSHALLER_METHOD,
                    GETUNMARSHALLER_SIGNATURE);
                mb.loadContext();
                mb.appendCallInterface(UNMARSHALLERPRESENT_METHOD,
View Full Code Here

                IMapping map = (IMapping)m_extensions.get(i);
                mb.loadContext();
                mb.appendLoadConstant(map.getMappingName());
                mb.appendCallInterface(GETUNMARSHALLER_METHOD,
                    GETUNMARSHALLER_SIGNATURE);
                mb.loadContext();
                mb.appendCallInterface(UNMARSHALLERPRESENT_METHOD,
                    UNMARSHALLERPRESENT_SIGNATURE);
                iffounds[i] = mb.appendIFNE(this);
            }
            mb.appendICONST_0();
View Full Code Here

        ArrayList maps = m_defContext.getMappings();
        if (maps != null && maps.size() > 0) {
            for (int i = 0; i < maps.size(); i++) {
                IMapping map = (IMapping)maps.get(i);
                if (!map.isAbstract() || map.isBase()) {
                    mb.loadContext(MARSHALCONTEXT_CLASS);
                    mb.appendLoadConstant(map.getMappingName());
                    mb.appendLoadConstant(map.getMarshaller().getName());
                    mb.appendCallVirtual(ADDMARSHALLER_METHOD,
                        ADDMARSHALLER_SIGNATURE);
                }
View Full Code Here

            }
        }
        if (hasattr || hascont) {
           
            // start by pushing namespace translation for precompiled binding
            mb.loadContext();
            mb.appendLoadConstant(m_container.getBindingRoot().getFactoryName());
            mb.appendCallInterface(PUSH_NAMESPACES_METHOD,
                PUSH_NAMESPACES_SIG);
           
            // handle the actual marshalling
View Full Code Here

                    mb.appendDUP();
                }
                m_component.genAttributeMarshal(mb);
            }
            if (hasattr || m_isAbstract) {
                mb.loadContext(MARSHALCONTEXT_CLASS);
                mb.appendCallVirtual(CLOSESTART_METHOD,
                    CLOSESTART_SIGNATURE);
                mb.appendPOP();
            }
            if (hascont) {
View Full Code Here

            if (hascont) {
                m_component.genContentMarshal(mb);
            }
           
            // pop namespace translation for precompiled binding
            mb.loadContext();
            mb.appendCallInterface(POP_NAMESPACES_METHOD,
                POP_NAMESPACES_SIG);
        }
       
        // undefine marshallings for child mappings of this mapping
View Full Code Here

        // undefine marshallings for child mappings of this mapping
        if (maps != null && maps.size() > 0) {
            for (int i = 0; i < maps.size(); i++) {
                IMapping map = (IMapping)maps.get(i);
                if (!map.isAbstract() || map.isBase()) {
                    mb.loadContext(MARSHALCONTEXT_CLASS);
                    mb.appendLoadConstant(map.getMappingName());
                    mb.appendCallVirtual(REMOVEMARSHALLER_METHOD,
                        REMOVEMARSHALLER_SIGNATURE);
                }
            }
View Full Code Here

            Type.VOID, MARSHAL_METHOD_ARGS, cf,
            Constants.ACC_PUBLIC|Constants.ACC_FINAL,
            1, "java.lang.Object", 2, MARSHALCONTEXT_INTERFACE);
        mb.addException(MethodBuilder.FRAMEWORK_EXCEPTION_CLASS);
        // TODO: optionally check for null value on object
        mb.loadContext();
        mb.loadObject();
        mb.appendCallVirtual("java.lang.Object.getClass",
            "()Ljava/lang/Class;");
        mb.appendCallVirtual("java.lang.Class.getName", "()Ljava/lang/String;");
        mb.appendCallInterface(GETMARSHALLER_METHOD, GETMARSHALLER_SIGNATURE);
View Full Code Here

        mb.appendThrow();
        
        // for valid extension mapping, just call the marshaller
        mb.targetNext(ifvalid);
        mb.loadObject();
        mb.loadContext();
        mb.appendCallInterface(MARSHALLERMARSHAL_METHOD,
            MARSHALLERMARSHAL_SIGNATURE);
        mb.appendReturn();
        mb.codeComplete(false);
        mb.addMethod();
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.