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

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


        methodAttrs1ann0 = new Annotation("Ljavax/xml/bind/annotation/XmlTransient;");
        methodAttrs1.annotations.add(methodAttrs1ann0);

        cv = cw.visitMethod(Constants.ACC_PUBLIC, "getComponentClass", "()Ljava/lang/Class;", null, methodAttrs1);
        cv.visitLdcInsn(componentType);
        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


          cv = cw.visitMethod(Constants.ACC_PUBLIC, "<init>", "()V", null, null);

          cv.visitVarInsn(Constants.ALOAD, 0);
          cv.visitTypeInsn(Constants.NEW, "javax/xml/namespace/QName");
          cv.visitInsn(Constants.DUP);
          cv.visitLdcInsn(theQName.getNamespaceURI());
          cv.visitLdcInsn(theQName.getLocalPart());
          cv.visitMethodInsn(Constants.INVOKESPECIAL, "javax/xml/namespace/QName", "<init>", "(Ljava/lang/String;Ljava/lang/String;)V");
          cv.visitLdcInsn(Type.getType(fieldType));
          cv.visitInsn(Constants.ACONST_NULL);
View Full Code Here

          cv.visitVarInsn(Constants.ALOAD, 0);
          cv.visitTypeInsn(Constants.NEW, "javax/xml/namespace/QName");
          cv.visitInsn(Constants.DUP);
          cv.visitLdcInsn(theQName.getNamespaceURI());
          cv.visitLdcInsn(theQName.getLocalPart());
          cv.visitMethodInsn(Constants.INVOKESPECIAL, "javax/xml/namespace/QName", "<init>", "(Ljava/lang/String;Ljava/lang/String;)V");
          cv.visitLdcInsn(Type.getType(fieldType));
          cv.visitInsn(Constants.ACONST_NULL);

          cv.visitMethodInsn(Constants.INVOKESPECIAL, "org/eclipse/persistence/internal/jaxb/WrappedValue", "<init>", "(Ljavax/xml/namespace/QName;Ljava/lang/Class;Ljava/lang/Object;)V");
View Full Code Here

          cv.visitTypeInsn(Constants.NEW, "javax/xml/namespace/QName");
          cv.visitInsn(Constants.DUP);
          cv.visitLdcInsn(theQName.getNamespaceURI());
          cv.visitLdcInsn(theQName.getLocalPart());
          cv.visitMethodInsn(Constants.INVOKESPECIAL, "javax/xml/namespace/QName", "<init>", "(Ljava/lang/String;Ljava/lang/String;)V");
          cv.visitLdcInsn(Type.getType(fieldType));
          cv.visitInsn(Constants.ACONST_NULL);

          cv.visitMethodInsn(Constants.INVOKESPECIAL, "org/eclipse/persistence/internal/jaxb/WrappedValue", "<init>", "(Ljavax/xml/namespace/QName;Ljava/lang/Class;Ljava/lang/Object;)V");
          cv.visitInsn(Constants.RETURN);
          cv.visitMaxs(5, 1);
View Full Code Here

        cv.visitMaxs(1, 0);

        // Add the "valueOf()" method
        cv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "valueOf", "(Ljava/lang/String;)L"
            + internalClassName + ";", null, null);
        cv.visitLdcInsn(Type.getType("L" + internalClassName + ";"));
        cv.visitVarInsn(ALOAD, 0);
        cv.visitMethodInsn(INVOKESTATIC, "java/lang/Enum", "valueOf",
            "(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;");
        cv.visitTypeInsn(CHECKCAST, internalClassName);
        cv.visitInsn(ARETURN);
View Full Code Here

        int lastCount = 0;
        for (int i = 0; i < enumValues.length; i++) {
            String enumValue = enumValues[i];
            cv.visitTypeInsn(NEW, internalClassName);
            cv.visitInsn(DUP);
            cv.visitLdcInsn(enumValue);
            if (i <= 5) {
                cv.visitInsn(ICONST[i]);
            }
            else {
                cv.visitIntInsn(BIPUSH, i);
View Full Code Here

        methodAttrs1ann0 = new Annotation("Ljavax/xml/bind/annotation/XmlTransient;");
        methodAttrs1.annotations.add(methodAttrs1ann0);

        cv = cw.visitMethod(Constants.ACC_PUBLIC, "getComponentClass", "()Ljava/lang/Class;", null, methodAttrs1);
        cv.visitLdcInsn(componentType);
        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

        cv.visitInsn(Constants.RETURN);
        cv.visitMaxs(1, 1);

        if (componentClass.isArray()) {
            cv = cw.visitMethod(Constants.ACC_PROTECTED, "adaptedClass", "()Ljava/lang/Class;", null, null);
            cv.visitLdcInsn(Type.getType("L" + nestedClass.getQualifiedName().replace('.', '/') + ";"));
            cv.visitInsn(Constants.ARETURN);
            cv.visitMaxs(1, 1);
        }

        cv = cw.visitMethod(Constants.ACC_PROTECTED, "componentClass", "()Ljava/lang/Class;", null, null);
View Full Code Here

        cv = cw.visitMethod(Constants.ACC_PROTECTED, "componentClass", "()Ljava/lang/Class;", null, null);
        JavaClass baseComponentClass = getBaseComponentType(componentClass);
        if (baseComponentClass.isPrimitive()) {
            cv.visitFieldInsn(Constants.GETSTATIC, getObjectType(baseComponentClass).getQualifiedName().replace('.', '/'), "TYPE", "Ljava/lang/Class;");
        } else {
            cv.visitLdcInsn(Type.getType("L" + baseComponentClass.getQualifiedName().replace('.', '/') + ";"));
        }
        cv.visitInsn(Constants.ARETURN);
        cv.visitMaxs(1, 1);

        RuntimeVisibleAnnotations getAdaptedValueMethodAnnotations = new RuntimeVisibleAnnotations();
View Full Code Here

          cv = cw.visitMethod(Constants.ACC_PUBLIC, "<init>", "()V", null, null);

          cv.visitVarInsn(Constants.ALOAD, 0);
          cv.visitTypeInsn(Constants.NEW, "javax/xml/namespace/QName");
          cv.visitInsn(Constants.DUP);
          cv.visitLdcInsn(theQName.getNamespaceURI());
          cv.visitLdcInsn(theQName.getLocalPart());
          cv.visitMethodInsn(Constants.INVOKESPECIAL, "javax/xml/namespace/QName", "<init>", "(Ljava/lang/String;Ljava/lang/String;)V");
          cv.visitLdcInsn(Type.getType(fieldType));
          cv.visitInsn(Constants.ACONST_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.