Package org.jibx.binding.classes

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


            mb.appendLoadConstant(m_container.getBindingRoot().getFactoryName());
            mb.appendCallInterface(PUSH_NAMESPACES_METHOD,
                PUSH_NAMESPACES_SIG);
           
            // handle the actual marshalling
            mb.loadObject(m_class.getClassName());
            if (hasattr) {
                if (hascont) {
                    mb.appendDUP();
                }
                m_component.genAttributeMarshal(mb);
View Full Code Here


            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);
        mb.appendDUP();
View Full Code Here

        mb.appendCreateNew("java.lang.StringBuffer");
        mb.appendDUP();
        mb.appendLoadConstant("Mapping for type ");
        mb.appendCallInit("java.lang.StringBuffer", "(Ljava/lang/String;)V");
        mb.appendDUP();
        mb.loadObject();
        mb.appendCallVirtual("java.lang.Object.getClass",
            "()Ljava/lang/Class;");
        mb.appendCallVirtual("java.lang.Class.getName", "()Ljava/lang/String;");
        mb.appendCallVirtual("java.lang.StringBuffer.append",
            "(Ljava/lang/String;)Ljava/lang/StringBuffer;");
View Full Code Here

            MethodBuilder.EXCEPTION_CONSTRUCTOR_SIGNATURE1);
        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);
View Full Code Here

        mb.addException(MethodBuilder.FRAMEWORK_EXCEPTION_CLASS);
       
        // first part of generated code just checks if an object has
        //  been supplied; if it has, this can just go direct to
        //  unmarshalling
        mb.loadObject();
        BranchWrapper ifnnull = mb.appendIFNONNULL(this);
       
        // check for extension mapping handling required
        if (m_extensions != null) {
           
View Full Code Here

                }
            }
        }
       
        // load object and cast to type
        mb.loadObject();
        mb.appendCreateCast(type);
       
        // handle the actual unmarshalling
        if (hasattr) {
            m_component.genAttributeUnmarshal(mb);
View Full Code Here

      mb.appendLoadConstant(cf.getName());
      mb.appendCallInterface(GETMARSHALLER_METHOD, GETMARSHALLER_SIGNATURE);
     
      // call the returned marshaller with this object and the marshalling
      //  context as parameters
      mb.loadObject();
      mb.loadContext();
      mb.appendCallInterface(MARSHALLERMARSHAL_METHOD,
          MARSHALLERMARSHAL_SIGNATURE);
      mb.appendReturn();
     
View Full Code Here

      mb.appendCallInterface(GETUNMARSHALLER_METHOD,
          GETUNMARSHALLER_SIGNATURE);
     
      // call the returned unmarshaller with this object and the unmarshalling
      //  context as parameters
      mb.loadObject();
      mb.loadContext();
      mb.appendCallInterface(UNMARSHALLERUNMARSHAL_METHOD,
          UNMARSHALLERUNMARSHAL_SIGNATURE);
      mb.appendReturn();
     
View Full Code Here

                new Type[] {type, UNMARSHALCONTEXT_TYPE}, cf,
                Constants.ACC_PUBLIC|Constants.ACC_STATIC, 0,
                m_class.getClassName(), 1, UNMARSHALLING_CONTEXT);
           
            // check if actually need to create a new instance
            mb.loadObject();
            BranchWrapper haveinst = mb.appendIFNONNULL(this);
           
            // check for factory supplied to create instance
            boolean haveobj = true;
            if (m_factoryMethod == null) {
View Full Code Here

//            if (m_preSetMethod != null) {
//                genUserMethodCall(true, m_preSetMethod, mb);
//            }
           
            // finish method code with return of new instance
            mb.loadObject();
            mb.appendReturn(m_class.getClassName());
            m_newInstanceMethod = m_class.getUniqueMethod(mb).getItem();
        }
    }
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.