Package org.eclipse.persistence.internal.libraries.asm

Examples of org.eclipse.persistence.internal.libraries.asm.CodeVisitor.visitFieldInsn()


        cv = cw.visitMethod(Constants.ACC_PUBLIC, "setItem", "(L" + collectionType.getInternalName() + ";)V", null, methodAttrs1);
        Label l0 = new Label();
        cv.visitLabel(l0);
        cv.visitVarInsn(Constants.ALOAD, 0);
        cv.visitVarInsn(Constants.ALOAD, 1);
        cv.visitFieldInsn(Constants.PUTFIELD, qualifiedInternalClassName, "item", "L" + collectionType.getInternalName() + ";");
        cv.visitInsn(Constants.RETURN);
        Label l1 = new Label();
        cv.visitLabel(l1);
        // CODE ATTRIBUTE
               
View Full Code Here


        methodAttrs2 = new SignatureAttribute("()L" + collectionType.getInternalName() + "<" + componentTypeInternalName  + ">;");
        methodAttrs1.next = methodAttrs2;
        cv = cw.visitMethod(Constants.ACC_PUBLIC, "getItem", "()L" + collectionType.getInternalName() + ";", null, methodAttrs1);
        cv.visitVarInsn(Constants.ALOAD, 0);
        cv.visitFieldInsn(Constants.GETFIELD, qualifiedInternalClassName, "item", "L" + collectionType.getInternalName() + ";");
        cv.visitInsn(Constants.ARETURN);
        cv.visitMaxs(1, 1);

        cv = cw.visitMethod(Constants.ACC_PUBLIC + Constants.ACC_BRIDGE + Constants.ACC_SYNTHETIC, "getItem", "()Ljava/lang/Object;", null, null);
        cv.visitVarInsn(Constants.ALOAD, 0);
View Full Code Here

                "L" + XRFIELDINFO_CLASSNAME_SLASHES + ";", null, null);
            cv = cw.visitMethod(ACC_STATIC, "<clinit>", "()V", null, null);
            cv.visitTypeInsn(NEW, XRFIELDINFO_CLASSNAME_SLASHES);
            cv.visitInsn(DUP);
            cv.visitMethodInsn(INVOKESPECIAL, XRFIELDINFO_CLASSNAME_SLASHES, INIT, "()V");
            cv.visitFieldInsn(PUTSTATIC, classNameAsSlashes, XR_FIELD_INFO_STATIC,
                "L" + XRFIELDINFO_CLASSNAME_SLASHES + ";");
            cv.visitInsn(RETURN);
            cv.visitMaxs(0, 0);
            cv = cw.visitMethod(ACC_PUBLIC, INIT, "()V", null, null);
            cv.visitVarInsn(ALOAD, 0);
View Full Code Here

            cv.visitMethodInsn(INVOKESPECIAL, XR_DYNAMIC_ENTITY_CLASSNAME_SLASHES, INIT, "()V");
            cv.visitInsn(RETURN);
            cv.visitMaxs(0, 0);
            cv = cw.visitMethod(ACC_PUBLIC, "getFieldInfo",
                "()L" + XRFIELDINFO_CLASSNAME_SLASHES + ";", null, null);
            cv.visitFieldInsn(GETSTATIC, classNameAsSlashes, XR_FIELD_INFO_STATIC,
                "L" + XRFIELDINFO_CLASSNAME_SLASHES + ";");
            cv.visitInsn(ARETURN);
            cv.visitMaxs(0, 0);
        }
        cw.visitEnd();
View Full Code Here

                null, null);
          
            cw.visitField(ACC_PUBLIC + ACC_STATIC, "NUM_ATTRIBUTES", "I", null, null);
            cv = cw.visitMethod(ACC_STATIC, "<clinit>", "()V", null, null);
            cv.visitInsn(ICONST_1);
            cv.visitFieldInsn(PUTSTATIC, classNameAsSlashes, "NUM_ATTRIBUTES", "I");
            cv.visitInsn(RETURN);
            cv.visitMaxs(0, 0);
   
            cv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "setNumAttributes", "(Ljava/lang/Integer;)V",
                null, null);
View Full Code Here

   
            cv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "setNumAttributes", "(Ljava/lang/Integer;)V",
                null, null);
            cv.visitVarInsn(ALOAD, 0);
            cv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Integer", "intValue", "()I");
            cv.visitFieldInsn(PUTSTATIC, classNameAsSlashes, "NUM_ATTRIBUTES", "I");
            cv.visitInsn(RETURN);
            cv.visitMaxs(0, 0);
   
            cv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "getNumAttributes", "()I", null, null);
            cv.visitFieldInsn(GETSTATIC, classNameAsSlashes, "NUM_ATTRIBUTES", "I");
View Full Code Here

            cv.visitFieldInsn(PUTSTATIC, classNameAsSlashes, "NUM_ATTRIBUTES", "I");
            cv.visitInsn(RETURN);
            cv.visitMaxs(0, 0);
   
            cv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "getNumAttributes", "()I", null, null);
            cv.visitFieldInsn(GETSTATIC, classNameAsSlashes, "NUM_ATTRIBUTES", "I");
            cv.visitInsn(IRETURN);
            cv.visitMaxs(0, 0);
   
            cv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
            cv.visitVarInsn(ALOAD, 0);
View Full Code Here

            cv.visitVarInsn(ALOAD, 0);
            cv.visitMethodInsn(INVOKESPECIAL, BASE_ENTITY_CLASSNAME_SLASHES, "<init>", "()V");
            cv.visitVarInsn(ALOAD, 0);
            cv.visitMethodInsn(INVOKESTATIC, classNameAsSlashes, "getNumAttributes", "()I");
            cv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
            cv.visitFieldInsn(PUTFIELD, classNameAsSlashes, "fields", "[Ljava/lang/Object;");
            cv.visitInsn(RETURN);
            cv.visitMaxs(0, 0);
        }
        cw.visitEnd();
        return cw.toByteArray();
View Full Code Here

                "L" + XRFIELDINFO_CLASSNAME_SLASHES + ";", null, null);
            cv = cw.visitMethod(ACC_STATIC, "<clinit>", "()V", null, null);
            cv.visitTypeInsn(NEW, XRFIELDINFO_CLASSNAME_SLASHES);
            cv.visitInsn(DUP);
            cv.visitMethodInsn(INVOKESPECIAL, XRFIELDINFO_CLASSNAME_SLASHES, INIT, "()V");
            cv.visitFieldInsn(PUTSTATIC, classNameAsSlashes, XR_FIELD_INFO_STATIC,
                "L" + XRFIELDINFO_CLASSNAME_SLASHES + ";");
            cv.visitInsn(RETURN);
            cv.visitMaxs(0, 0);
            cv = cw.visitMethod(ACC_PUBLIC, INIT, "()V", null, null);
            cv.visitVarInsn(ALOAD, 0);
View Full Code Here

            cv.visitMethodInsn(INVOKESPECIAL, XR_DYNAMIC_ENTITY_CLASSNAME_SLASHES, INIT, "()V");
            cv.visitInsn(RETURN);
            cv.visitMaxs(0, 0);
            cv = cw.visitMethod(ACC_PUBLIC, "getFieldInfo",
                "()L" + XRFIELDINFO_CLASSNAME_SLASHES + ";", null, null);
            cv.visitFieldInsn(GETSTATIC, classNameAsSlashes, XR_FIELD_INFO_STATIC,
                "L" + XRFIELDINFO_CLASSNAME_SLASHES + ";");
            cv.visitInsn(ARETURN);
            cv.visitMaxs(0, 0);
    }
    cw.visitEnd();
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.