Package org.jibx.binding.classes

Examples of org.jibx.binding.classes.MarshalBuilder


        if (m_marshalAttributeName == null) {
           
            // set up for constructing new method
            String name = m_container.getBindingRoot().getPrefix() +
                MARSHAL_ATTR_SUFFIX;
            MarshalBuilder meth = new MarshalBuilder(name,
                m_class.getClassFile(), m_class.getMungedFile());
            m_marshalAttributeName = meth.getFullName();
            m_marshalSignature = meth.getSignature();
           
            // if preget method supplied add code to call it
            if (m_preGetMethod != null) {
                genUserMethodCall(false, m_preGetMethod, meth);
            }
           
            // push object being marshalled to marshaller stack
            meth.loadContext();
            meth.loadObject();
            meth.appendCallVirtual(MARSHAL_PUSHOBJECTMETHOD,
                PUSHOBJECT_SIGNATURE);
           
            // generate actual marshalling code
            meth.loadContext();
            m_component.genAttributeMarshal(meth);
           
            // pop object from stack
            meth.loadContext();
            meth.appendCallVirtual(MARSHAL_POPOBJECTMETHOD,
                POPOBJECT_SIGNATURE);
           
            // finish and add constructed method to class
            meth.appendReturn();
            if (m_lockAttributeMarshal) {
                m_marshalAttributeMethod =
                    m_class.getUniqueNamed(meth).getItem();
            } else {
                m_marshalAttributeMethod =
View Full Code Here


        if (m_marshalContentName == null) {
           
            // set up for constructing new method
            String name =
                m_container.getBindingRoot().getPrefix() + MARSHAL_SUFFIX;
            MarshalBuilder meth = new MarshalBuilder(name,
                m_class.getClassFile(), m_class.getMungedFile());
            m_marshalContentName = meth.getFullName();
            m_marshalSignature = meth.getSignature();
           
            // if preget method supplied and no attributes add code to call it
            if (m_preGetMethod != null && !hasAttribute()) {
                genUserMethodCall(false, m_preGetMethod, meth);
            }
           
            // push object being marshalled to marshaller stack
            meth.loadContext();
            meth.loadObject();
            meth.appendCallVirtual(MARSHAL_PUSHOBJECTMETHOD,
                PUSHOBJECT_SIGNATURE);
           
            // generate actual marshalling code
            meth.loadContext();
            if (!m_fakeContent) {
                m_component.genContentMarshal(meth);
            }
           
            // pop object from stack
            meth.loadContext();
            meth.appendCallVirtual(MARSHAL_POPOBJECTMETHOD,
                POPOBJECT_SIGNATURE);
           
            // finish and add constructed method to class
            meth.appendReturn();
            if (m_lockContentMarshal) {
                m_marshalContentMethod =
                    m_class.getUniqueNamed(meth).getItem();
            } else {
                m_marshalContentMethod =
View Full Code Here

TOP

Related Classes of org.jibx.binding.classes.MarshalBuilder

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.