Examples of appendCallInit()


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

        
        // generate and throw exception describing the problem
        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;");
View Full Code Here

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

        mb.appendCallVirtual("java.lang.StringBuffer.toString",
            "()Ljava/lang/String;");
        mb.appendCreateNew(MethodBuilder.FRAMEWORK_EXCEPTION_CLASS);
        mb.appendDUP_X1();
        mb.appendSWAP();
        mb.appendCallInit(MethodBuilder.FRAMEWORK_EXCEPTION_CLASS,
            MethodBuilder.EXCEPTION_CONSTRUCTOR_SIGNATURE1);
        mb.appendThrow();
        
        // for valid extension mapping, just call the marshaller
        mb.targetNext(ifvalid);
View Full Code Here

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

            // generate code to throw exception if no matching extension
            //  found
            mb.appendCreateNew("java.lang.StringBuffer");
            mb.appendDUP();
            mb.appendLoadConstant("Element ");
            mb.appendCallInit("java.lang.StringBuffer",
                "(Ljava/lang/String;)V");
            mb.appendDUP();
            mb.loadContext(UNMARSHALCONTEXT_CLASS);
            mb.appendCallVirtual(CURRENTELEMENT_METHOD,
                CURRENTELEMENT_SIGNATURE);
View Full Code Here

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

            mb.appendCallVirtual("java.lang.StringBuffer.toString",
                "()Ljava/lang/String;");
            mb.appendCreateNew(MethodBuilder.FRAMEWORK_EXCEPTION_CLASS);
            mb.appendDUP_X1();
            mb.appendSWAP();
            mb.appendCallInit(MethodBuilder.FRAMEWORK_EXCEPTION_CLASS,
                MethodBuilder.EXCEPTION_CONSTRUCTOR_SIGNATURE1);
            mb.appendThrow();
            if (iffounds.length > 0) {
           
                // finish by calling unmarshaller for extension mapping
View Full Code Here

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

            // throw an exception when no instance supplied
            mb.appendCreateNew(MethodBuilder.FRAMEWORK_EXCEPTION_CLASS);
            mb.appendDUP();
            mb.appendLoadConstant("Abstract mapping requires instance to " +
                "be supplied for class " + m_class.getClassName());
            mb.appendCallInit(MethodBuilder.FRAMEWORK_EXCEPTION_CLASS,
                MethodBuilder.EXCEPTION_CONSTRUCTOR_SIGNATURE1);
            mb.appendThrow();
           
        }
        if (hasname) {
View Full Code Here

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

                    // cannot create instance, throw exception
                    mb.appendCreateNew(MethodBuilder.FRAMEWORK_EXCEPTION_CLASS);
                    mb.appendDUP();
                    mb.appendLoadConstant("Cannot create instance of interface or abstract class " +
                        m_createClass.getName());
                    mb.appendCallInit(MethodBuilder.FRAMEWORK_EXCEPTION_CLASS,
                        MethodBuilder.EXCEPTION_CONSTRUCTOR_SIGNATURE1);
                    mb.appendThrow();
                    haveobj = false;
                   
                } else {
View Full Code Here

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

                            // cannot create instance, throw exception
                            mb.appendCreateNew(MethodBuilder.FRAMEWORK_EXCEPTION_CLASS);
                            mb.appendDUP();
                            mb.appendLoadConstant("Cannot create instance of class " +
                                m_createClass.getName() + " (no default constructor)");
                            mb.appendCallInit(MethodBuilder.FRAMEWORK_EXCEPTION_CLASS,
                                MethodBuilder.EXCEPTION_CONSTRUCTOR_SIGNATURE1);
                            mb.appendThrow();
                            haveobj = false;
                           
                        }
View Full Code Here

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

                       
                        // no factory, so create an instance, duplicate the
                        //  reference, and then call the null constructor
                        mb.appendCreateNew(m_createClass.getName());
                        mb.appendDUP();
                        mb.appendCallInit(m_createClass.getName(),"()V");
                       
                    }
                }
               
            } else {
View Full Code Here

Examples of org.jibx.binding.classes.ExceptionMethodBuilder.appendCallInit()

           
            // throw an exception for value not found
            dmeth.appendCreateNew("java.lang.StringBuffer");
            dmeth.appendDUP();
            dmeth.appendLoadConstant("No match found for value '");
            dmeth.appendCallInit("java.lang.StringBuffer",
                "(Ljava/lang/String;)V");
            dmeth.appendLoadLocal(0);
            dmeth.appendCallVirtual("java.lang.StringBuffer.append",
                "(Ljava/lang/String;)Ljava/lang/StringBuffer;");
            dmeth.appendLoadConstant("' in enum class " + type);
View Full Code Here

Examples of org.jibx.binding.classes.ExceptionMethodBuilder.appendCallInit()

            dmeth.appendCallVirtual("java.lang.StringBuffer.toString",
                "()Ljava/lang/String;");
            dmeth.appendCreateNew(MethodBuilder.FRAMEWORK_EXCEPTION_CLASS);
            dmeth.appendDUP_X1();
            dmeth.appendSWAP();
            dmeth.appendCallInit(MethodBuilder.FRAMEWORK_EXCEPTION_CLASS,
                MethodBuilder.EXCEPTION_CONSTRUCTOR_SIGNATURE1);
            dmeth.appendThrow();
           
            // load and compare the value
            dmeth.targetNext(loadnext);
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.