Package serp.bytecode

Examples of serp.bytecode.Code.invokespecial()


        // super.writeUnmanaged (out);
        if (parentDetachable) {
            loadManagedInstance(code, false);
            code.aload().setParam(0);
            code.invokespecial().setMethod(getType(_meta.
                getPCSuperclassMetaData()), PRE + "WriteUnmanaged", void.class,
                outargs);
        }

        // write declared unmanaged serializable fields
View Full Code Here


                (CloneNotSupportedException.class);
            code = clone.getCode(true);

            // return super.clone ();
            loadManagedInstance(code, false);
            code.invokespecial().setMethod(superName, "clone",
                Object.class.getName(), null);
            code.areturn();
        } else {
            // get the clone method code
            code = clone.getCode(false);
View Full Code Here

        // ##### test case: B extends A. Methods defined in A. What
        // ##### happens?
        // super.setXXX(...)
        code.aload().setThis();
        code.xload().setParam(0).setType(propType);
        code.invokespecial().setMethod(_managedType.getType(),
            setterName, void.class, new Class[] { propType });

        code.vreturn();
        code.calculateMaxLocals();
        code.calculateMaxStack();
View Full Code Here

        // method.
        if (!getRedefine())
            addNotifyAccess(code, fmd);

        code.aload().setThis();
        code.invokespecial().setMethod(_managedType.getType(), methName,
            fmd.getDeclaredType(), null);
        code.xreturn().setType(fmd.getDeclaredType());
        code.calculateMaxLocals();
        code.calculateMaxStack();
    }
View Full Code Here

        // super.writeUnmanaged (out);
        if (parentDetachable) {
            loadManagedInstance(code, false);
            code.aload().setParam(0);
            code.invokespecial().setMethod(getType(_meta.
                getPCSuperclassMetaData()), PRE + "WriteUnmanaged", void.class,
                outargs);
        }

        // write declared unmanaged serializable fields
View Full Code Here

        code.dup();
        if (params.length == 1) {
            code.aload().setParam(0);
            code.checkcast().setType(params[0]);
        }
        code.invokespecial().setMethod(type, "<init>", void.class, params);
        if (params.length == 0) {
            code.dup();
            code.aload().setParam(0);
            code.checkcast().setType(Calendar.class);
            code.invokevirtual().setMethod(Calendar.class, "getTimeInMillis",
View Full Code Here

        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();
        code.calculateMaxStack();
        code.calculateMaxLocals();

        // proxy the protected computeFields method b/c it is called on
View Full Code Here

        code.aload().setThis();
        code.constant().setValue(true);
        code.invokestatic().setMethod(Proxies.class, "dirty", void.class,
            new Class[] { Proxy.class, boolean.class });
        code.aload().setThis();
        code.invokespecial().setMethod(type, "computeFields", void.class, null);
        code.vreturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();
    }
View Full Code Here

        Class[] params = cons.getParameterTypes();
        if (params.length == 1) {
            code.aload().setParam(0);
            code.checkcast().setType(params[0]);
        }
        code.invokespecial().setMethod(cons);
        if (params.length == 0)
            copyProperties(type, code);
        code.areturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();
View Full Code Here

        code.dup();
        if (params.length == 1) {
            code.aload().setParam(0);
            code.checkcast().setType(params[0]);
        }
        code.invokespecial().setMethod("<init>", void.class, params);
        if (params.length == 0)
            copyProperties(type, code);
        code.areturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();
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.