Package org.jibx.binding.classes

Examples of org.jibx.binding.classes.MethodBuilder.appendLoadConstant()


        for (int i = 0; i < basecount; i++) {
            int[] table = (int[])m_baseNamespaceTables.get(i);
            if (table != null) {
                mb.appendDUP();
                mb.appendLoadConstant(i);
                mb.appendLoadConstant(buildIntsBlob(table));
                mb.appendAASTORE();
            }
        }
        for (int i = 0; i < m_closureNamespaceTables.size(); i++) {
            int[] table = (int[])m_closureNamespaceTables.get(i);
View Full Code Here


            }
        }
        for (int i = 0; i < m_closureNamespaceTables.size(); i++) {
            int[] table = (int[])m_closureNamespaceTables.get(i);
            mb.appendDUP();
            mb.appendLoadConstant(i+basecount);
            mb.appendLoadConstant(buildIntsBlob(table));
            mb.appendAASTORE();
        }
       
        // call the base class constructor
View Full Code Here

        }
        for (int i = 0; i < m_closureNamespaceTables.size(); i++) {
            int[] table = (int[])m_closureNamespaceTables.get(i);
            mb.appendDUP();
            mb.appendLoadConstant(i+basecount);
            mb.appendLoadConstant(buildIntsBlob(table));
            mb.appendAASTORE();
        }
       
        // call the base class constructor
        mb.appendCallInit(FACTORY_BASE,
View Full Code Here

           
            // initialize with appropriate size
            mb.appendLoadLocal(0);
            mb.appendCreateNew(STRINGINT_MAPTYPE);
            mb.appendDUP();
            mb.appendLoadConstant(tnames.size());
            mb.appendCallInit(STRINGINT_MAPTYPE, STRINGINTINIT_SIGNATURE);
           
            // add all values to map
            for (int i = 0; i < tnames.size(); i++) {
                int index = s_mappedClasses.find(tnames.get(i));
View Full Code Here

            // add all values to map
            for (int i = 0; i < tnames.size(); i++) {
                int index = s_mappedClasses.find(tnames.get(i));
                if (index >= 0) {
                    mb.appendDUP();
                    mb.appendLoadConstant((String)tnames.get(i));
                    mb.appendLoadConstant(index);
                    mb.appendCallVirtual(STRINGINTADD_METHOD,
                        STRINGINTADD_SIGNATURE);
                    mb.appendPOP();
                }
View Full Code Here

            for (int i = 0; i < tnames.size(); i++) {
                int index = s_mappedClasses.find(tnames.get(i));
                if (index >= 0) {
                    mb.appendDUP();
                    mb.appendLoadConstant((String)tnames.get(i));
                    mb.appendLoadConstant(index);
                    mb.appendCallVirtual(STRINGINTADD_METHOD,
                        STRINGINTADD_SIGNATURE);
                    mb.appendPOP();
                }
            }
View Full Code Here

        mb.addMethod();
       
        // add the compiler version access method
        mb = new ExceptionMethodBuilder(GETVERSION_METHODNAME,
            Type.INT, new Type[0], cf, Constants.ACC_PUBLIC);
        mb.appendLoadConstant(IBindingFactory.CURRENT_VERSION_NUMBER);
        mb.appendReturn("int");
        mb.codeComplete(false);
        mb.addMethod();
       
        // add the compiler distribution access method
View Full Code Here

        mb.addMethod();
       
        // add the compiler distribution access method
        mb = new ExceptionMethodBuilder(GETDISTRIB_METHODNAME,
            Type.STRING, new Type[0], cf, Constants.ACC_PUBLIC);
        mb.appendLoadConstant(CURRENT_VERSION_NAME);
        mb.appendReturn(Type.STRING);
        mb.codeComplete(false);
        mb.addMethod();
       
        // add the type mapping index lookup method
View Full Code Here

                // generate in-line compares for mapping
                for (int i = 0; i < tnames.size(); i++) {
                    int index = s_mappedClasses.find(tnames.get(i));
                    if (index >= 0) {
                        mb.appendLoadLocal(1);
                        mb.appendLoadConstant((String)tnames.get(i));
                        mb.appendCallVirtual("java.lang.String.equals",
                            "(Ljava/lang/Object;)Z");
                        BranchWrapper onfail = mb.appendIFEQ(this);
                        mb.appendLoadConstant(index);
                        mb.appendReturn(Type.INT);
View Full Code Here

                        mb.appendLoadLocal(1);
                        mb.appendLoadConstant((String)tnames.get(i));
                        mb.appendCallVirtual("java.lang.String.equals",
                            "(Ljava/lang/Object;)Z");
                        BranchWrapper onfail = mb.appendIFEQ(this);
                        mb.appendLoadConstant(index);
                        mb.appendReturn(Type.INT);
                        mb.targetNext(onfail);
                    }
                }
                mb.appendLoadConstant(-1);
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.