Package org.objectweb.asm

Examples of org.objectweb.asm.FieldVisitor.visitEnd()


  public void visitEnd() {
    FieldVisitor fv = cv.visitField(Opcodes.ACC_FINAL | Opcodes.ACC_STATIC
        | Opcodes.ACC_PRIVATE, "ON_POSITIVE_INSTRUMENTED", "Z", null,
        new Integer(1));
    if (fv != null) {
      fv.visitEnd();
    }
    super.visitEnd();
  }
}
View Full Code Here


        cw.visit(V1_5, ACC_PUBLIC + ACC_SUPER, proxyName, null, Type.getInternalName(superclass), getNames(interfaces));

        {
            fv = cw.visitField(ACC_PRIVATE + ACC_TRANSIENT, "swappable", encodedClassName(HotSwappable.Swappable.class), null, null);
            fv.visitEnd();
        }
        doConstructor(proxyName, cw);
        Set<String> methodsDone = new HashSet<String>();
        for (Class<?> iface : interfaces) {
            Method[] meths = iface.getMethods();
View Full Code Here

                AnnotationVisitor list = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlList;", true);
                list.visitEnd();
            }
        }

        fv.visitEnd();
    }

    protected void declareSetter(ClassWriter cw,
                                 String classDescriptor,
                                 String classSignature,
View Full Code Here

    // public static <Interface> delegate;
    private static void declareField(ClassWriter cw, String interfaceName) {
        FieldVisitor fv =
            cw.visitField(ACC_PUBLIC + ACC_STATIC, DELEGATE_FIELD, getSignature(interfaceName), null, null);
        fv.visitEnd();
    }

    // public class _<Interface>Impl implements <Interface>
    private static void declareClass(ClassWriter cw, String interfaceName, String className) {
        cw.visit(V1_5, ACC_PUBLIC + ACC_SUPER, className, null, "java/lang/Object", new String[] {interfaceName});
View Full Code Here

        cw.visitSource("NamespaceMapper.java", null);

        fv = cw.visitField(Opcodes.ACC_PRIVATE + Opcodes.ACC_FINAL,
                           "nspref", "Ljava/util/Map;",
                           "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;", null);
        fv.visitEnd();
       
        mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "<init>",
                            "(Ljava/util/Map;)V",
                            "(Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;)V", null);
        mv.visitCode();
View Full Code Here

                AnnotationVisitor list = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlList;", true);
                list.visitEnd();
            }
        }

        fv.visitEnd();
    }

    protected void declareSetter(ClassWriter cw,
                                 String classDescriptor,
                                 String classSignature,
View Full Code Here

            if (factory.getWrapperPartMinOccurs(mpi) == 1) {
                av0.visit("required", Boolean.TRUE);
            }
            av0.visitEnd();           
        }
        fv.visitEnd();

        String methodName = JAXBUtils.nameToIdentifier(name, JAXBUtils.IdentifierType.GETTER);
        MethodVisitor mv = cw.visitMethod(Opcodes.ACC_PUBLIC, methodName, "()" + classCode,
                                          fieldDescriptor == null ? null : "()" + fieldDescriptor,
                                          null);
View Full Code Here

                AnnotationVisitor list = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlList;", true);
                list.visitEnd();
            }
        }

        fv.visitEnd();
    }

    protected void declareSetter(ClassWriter cw,
                                 String classDescriptor,
                                 String classSignature,
View Full Code Here

        cw.visitSource("NamespaceMapper.java", null);

        fv = cw.visitField(Opcodes.ACC_PRIVATE + Opcodes.ACC_FINAL,
                           "nspref", "Ljava/util/Map;",
                           "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;", null);
        fv.visitEnd();
       
        mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "<init>",
                            "(Ljava/util/Map;)V",
                            "(Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;)V", null);
        mv.visitCode();
View Full Code Here

                FieldVisitor fv;
                MethodVisitor mv;
               
                String beanClassCode = getClassCode(bean);
                fv = cw.visitField(0, "faultInfo", beanClassCode, null, null);
                fv.visitEnd();
                               
               
                mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "<init>",
                                    "(Ljava/lang/String;" + beanClassCode + ")V", null, null);
                mv.visitCode();
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.