Package com.alibaba.citrus.codegen

Examples of com.alibaba.citrus.codegen.MethodBuilder


    /**
     * ����Ĭ�Ϲ��캯����
     */
    public static void addDefaultConstructor(ClassBuilder cb) {
        MethodBuilder mb = cb.addConstructor(null, null);
        CodeBuilder code = mb.startCode();

        code.loadThis();
        code.invokeConstructor(cb.getSuperType(), new com.alibaba.citrus.asm.commons.Method(CONSTRUCTOR_NAME, "()V"));
        code.returnValue();
    }
View Full Code Here


    /**
     * ����һ�����س�����<code>toString()</code>������
     */
    public static void addToString(ClassBuilder cb, String constantToString) {
        MethodBuilder mb = cb.addMethod(String.class, "toString", null, null);
        CodeBuilder code = mb.startCode();

        code.push(constantToString);
        code.returnValue();
    }
View Full Code Here

TOP

Related Classes of com.alibaba.citrus.codegen.MethodBuilder

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.