Examples of makePublic()


Examples of serp.bytecode.BCMethod.makePublic()

        // key type
        BCField keyType = bc.declareField("keyType", Class.class);
        keyType.setTransient(true);
        m = bc.declareMethod("getKeyType", Class.class, null);
        m.makePublic();
        code = m.getCode(true);
        code.aload().setThis();
        code.getfield().setField(keyType);
        code.areturn();
        code.calculateMaxStack();
View Full Code Here

Examples of serp.bytecode.BCMethod.makePublic()

        // value type
        BCField valueType = bc.declareField("valueType", Class.class);
        valueType.setTransient(true);
        m = bc.declareMethod("getValueType", Class.class, null);
        m.makePublic();
        code = m.getCode(true);
        code.aload().setThis();
        code.getfield().setField(valueType);
        code.areturn();
        code.calculateMaxStack();
View Full Code Here

Examples of serp.bytecode.BCMethod.makePublic()

        // new instance factory
        m = bc.declareMethod("newInstance", ProxyMap.class,
            new Class[] { Class.class, Class.class, Comparator.class,
            boolean.class });
        m.makePublic();
        code = m.getCode(true);

        code.anew().setType(bc);
        code.dup();
        cons = findComparatorConstructor(type);
View Full Code Here

Examples of serp.bytecode.BCMethod.makePublic()

        // add a default constructor that delegates to the millis constructor
        BCMethod m;
        Code code;
        if (!hasDefaultCons) {
            m = bc.declareMethod("<init>", void.class, null);
            m.makePublic();
            code = m.getCode(true);
            code.aload().setThis();
            code.invokestatic().setMethod(System.class, "currentTimeMillis",
                long.class, null);
            code.invokespecial().setMethod(type, "<init>", void.class,
View Full Code Here

Examples of serp.bytecode.BCMethod.makePublic()

            params = new Class[] { long.class };
        else
            params = new Class[0];

        m = bc.declareMethod("copy", Object.class, new Class[] {Object.class});
        m.makePublic();
        code = m.getCode(true);

        code.anew().setType(type);
        code.dup();
        if (params.length == 1) {
View Full Code Here

Examples of serp.bytecode.BCMethod.makePublic()

        code.calculateMaxStack();
        code.calculateMaxLocals();

        // new instance factory
        m = bc.declareMethod("newInstance", ProxyDate.class, null);
        m.makePublic();
        code = m.getCode(true);
        code.anew().setType(bc);
        code.dup();
        code.invokespecial().setMethod("<init>", void.class, null);
        code.areturn();
View Full Code Here

Examples of serp.bytecode.BCMethod.makePublic()

        Class[] params = (cons == null) ? new Class[0]
            : cons.getParameterTypes();

        BCMethod m = bc.declareMethod("copy", Object.class,
            new Class[] {Object.class});
        m.makePublic();
        Code code = m.getCode(true);

        code.anew().setType(type);
        code.dup();
        if (params.length == 1) {
View Full Code Here

Examples of serp.bytecode.BCMethod.makePublic()

        code.calculateMaxStack();
        code.calculateMaxLocals();

        // new instance factory
        m = bc.declareMethod("newInstance", ProxyCalendar.class, null);
        m.makePublic();
        code = m.getCode(true);
        code.anew().setType(bc);
        code.dup();
        code.invokespecial().setMethod("<init>", void.class, null);
        code.areturn();
View Full Code Here

Examples of serp.bytecode.BCMethod.makePublic()

     */
    private void proxyOverrideMethod(BCClass bc, Method meth,
        Method helper, Class[] params) {
        BCMethod m = bc.declareMethod(meth.getName(), meth.getReturnType(),
            meth.getParameterTypes());
        m.makePublic();
        Code code = m.getCode(true);

        code.aload().setThis();
        for (int i = 1; i < params.length; i++)
            code.xload().setParam(i - 1).setType(params[i]);
View Full Code Here

Examples of serp.bytecode.BCMethod.makePublic()

     */
    private void proxyBeforeAfterMethod(BCClass bc, Class type, Method meth,
        Method before, Class[] params, Method after, Class[] afterParams) {
        BCMethod m = bc.declareMethod(meth.getName(), meth.getReturnType(),
            meth.getParameterTypes());
        m.makePublic();
        Code code = m.getCode(true);

        // invoke before
        int beforeRet = -1;
        if (before != null) {
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.