Package com.sleepycat.asm

Examples of com.sleepycat.asm.MethodVisitor.visitCode()


     */
    private void genBdbWriteSecKeyFields() {
        MethodVisitor mv = cv.visitMethod
            (ACC_PUBLIC, "bdbWriteSecKeyFields",
             "(Lcom/sleepycat/persist/impl/EntityOutput;)V", null, null);
        mv.visitCode();
       
        /*
         * In JE 5.0, String is treated as primitive type, so String does
         * not need to be registered. [#19247]
         */
 
View Full Code Here


     */
    private void genBdbReadSecKeyFields() {
        MethodVisitor mv = cv.visitMethod
            (ACC_PUBLIC, "bdbReadSecKeyFields",
             "(Lcom/sleepycat/persist/impl/EntityInput;III)V", null, null);
        mv.visitCode();
        if (priKeyField != null &&
            isRefType(priKeyField.type) &&
            !priKeyField.isString) {
            genRegisterPrimaryKey(mv, true);
        } else if (priKeyField != null && priKeyField.isString) {
View Full Code Here

     */
    private void genBdbWriteNonKeyFields() {
        MethodVisitor mv = cv.visitMethod
            (ACC_PUBLIC, "bdbWriteNonKeyFields",
             "(Lcom/sleepycat/persist/impl/EntityOutput;)V", null, null);
        mv.visitCode();
        if (!isCompositeKey) {
            if (hasPersistentSuperclass) {
                mv.visitVarInsn(ALOAD, 0);
                mv.visitVarInsn(ALOAD, 1);
                mv.visitMethodInsn
View Full Code Here

     */
    private void genBdbReadNonKeyFields() {
        MethodVisitor mv = cv.visitMethod
            (ACC_PUBLIC, "bdbReadNonKeyFields",
             "(Lcom/sleepycat/persist/impl/EntityInput;III)V", null, null);
        mv.visitCode();
        if (!isCompositeKey) {
            genReadSuperKeyFields(mv, false);
            genReadFieldSwitch(mv, nonKeyFields);
        }
        mv.visitInsn(RETURN);
View Full Code Here

        MethodVisitor mv = cv.visitMethod
            (ACC_PUBLIC, "bdbWriteCompositeKeyFields",
             "(Lcom/sleepycat/persist/impl/EntityOutput;" +
             "[Lcom/sleepycat/persist/impl/Format;)V",
             null, null);
        mv.visitCode();
        if (isCompositeKey) {
            for (int i = 0; i < nonKeyFields.size(); i += 1) {
                FieldInfo field = nonKeyFields.get(i);
                if (!genWriteSimpleKeyField(mv, field)) {
                    /* For a non-simple type, call writeKeyObject. */
 
View Full Code Here

        MethodVisitor mv = cv.visitMethod
            (ACC_PUBLIC, "bdbReadCompositeKeyFields",
             "(Lcom/sleepycat/persist/impl/EntityInput;" +
             "[Lcom/sleepycat/persist/impl/Format;)V",
             null, null);
        mv.visitCode();
        if (isCompositeKey) {
            for (int i = 0; i < nonKeyFields.size(); i += 1) {
                FieldInfo field = nonKeyFields.get(i);
                /* Ignore non-simple (illegal) types for composite key. */
                if (!genReadSimpleKeyField(mv, field)) {
View Full Code Here

     */
    private void genBdbGetField() {
        MethodVisitor mv = cv.visitMethod
            (ACC_PUBLIC, "bdbGetField",
             "(Ljava/lang/Object;IIZ)Ljava/lang/Object;", null, null);
        mv.visitCode();
        mv.visitVarInsn(ILOAD, 3);
        Label l0 = new Label();
        mv.visitJumpInsn(IFLE, l0);
        Label l1 = new Label();
        if (hasPersistentSuperclass) {
View Full Code Here

     */
    private void genBdbSetField() {
        MethodVisitor mv = cv.visitMethod
            (ACC_PUBLIC, "bdbSetField",
             "(Ljava/lang/Object;IIZLjava/lang/Object;)V", null, null);
        mv.visitCode();
        mv.visitVarInsn(ILOAD, 3);
        Label l0 = new Label();
        mv.visitJumpInsn(IFLE, l0);
        if (hasPersistentSuperclass) {
            mv.visitVarInsn(ALOAD, 0);
View Full Code Here

     */
    private void genBdbSetPriField() {
        MethodVisitor mv = cv.visitMethod
            (ACC_PUBLIC, "bdbSetPriField",
             "(Ljava/lang/Object;Ljava/lang/Object;)V", null, null);
        mv.visitCode();
        if (priKeyField != null) {
            mv.visitVarInsn(ALOAD, 0);
            mv.visitVarInsn(ALOAD, 2);
            if (isRefType(priKeyField.type)) {
                mv.visitTypeInsn(CHECKCAST, getTypeInstName(priKeyField.type));
View Full Code Here

     }
     */
    private void genStaticBlock() {
        MethodVisitor mv =
            cv.visitMethod(ACC_STATIC, "<clinit>", "()V", null, null);
        mv.visitCode();
        if (staticBlockMethod != null) {
            mv.visitMethodInsn
                (INVOKESTATIC, className, staticBlockMethod, "()V");
        }
        mv.visitLdcInsn(className.replace('/', '.'));
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.