Package serp.bytecode

Examples of serp.bytecode.Code.areturn()


        code.invokespecial().setMethod(oidType, "<init>", void.class, args);
        if (!_meta.isOpenJPAIdentity() && _meta.isObjectIdTypeShared())
            code.invokespecial().setMethod(ObjectId.class, "<init>",
                void.class, new Class[]{ Class.class, Object.class });
        code.areturn();

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


        BCMethod method = _pc.declareMethod(PRE + "GetIDOwningClass",
            Class.class, null);
        Code code = method.getCode(true);

        code.classconstant().setClass(getType(_meta));
        code.areturn();

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

            getfield(code, _managedType, fmds[i].getName());
            putfield(code, _managedType, fmds[i].getName(),
                fmds[i].getDeclaredType());
        }

        code.areturn().setType(Object.class);

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

        // case i:
        //     return <_attrsToFields.get(fmds[i].getName())>
        for (int i = 0; i < fmds.length; i++) {
            tabins.addTarget(code.constant().setValue(
                _attrsToFields.get(fmds[i].getName())));
            code.areturn();
        }

        // default: throw new IllegalArgumentException ()
        tabins.setDefaultTarget(throwException
            (code, IllegalArgumentException.class));
View Full Code Here

            // 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);
            if (code == null)
                return;
View Full Code Here

            loadManagedInstance(code, false);
            getfield(code, _managedType.getProject().loadClass(declarer),
                name);
        } else
            code.constant().setNull();
        code.areturn();
        code.calculateMaxLocals();
        code.calculateMaxStack();

        // public void pcSetDetachedState (Object state)
        method = _pc.declareMethod(PRE + "SetDetachedState",
View Full Code Here

        // case i:
        //     return <_attrsToFields.get(fmds[i].getName())>
        for (int i = 0; i < fmds.length; i++) {
            tabins.addTarget(code.constant().setValue(
                _attrsToFields.get(fmds[i].getName())));
            code.areturn();
        }

        // default: throw new IllegalArgumentException ()
        tabins.setDefaultTarget(throwException
            (code, IllegalArgumentException.class));
View Full Code Here

                void.class, new Class[]{ Object.class });
        }

        // return pc;
        code.aload().setLocal(inst);
        code.areturn();

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

        Code code = m.getCode(true);
        code.aload().setThis();
        code.constant().setValue(!runtime);
        code.invokestatic().setMethod(Proxies.class, "writeReplace",
            Object.class, new Class[] { Proxy.class, boolean.class });
        code.areturn();
        code.calculateMaxLocals();
        code.calculateMaxStack();
    }

    /**
 
View Full Code Here

            loadManagedInstance(code, false);
            getfield(code, _managedType.getProject().loadClass(declarer),
                name);
        } else
            code.constant().setNull();
        code.areturn();
        code.calculateMaxLocals();
        code.calculateMaxStack();

        // public void pcSetDetachedState (Object state)
        method = _pc.declareMethod(PRE + "SetDetachedState",
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.