Package org.objectweb.asm

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


          IMPORT_ANN_TYPE.getDescriptor(), true);
      av.visit("module", f.mod.getName());
      av.visit("fun", f.fun.getName());
      av.visit("arity", f.arity);
      av.visitEnd();
      fv.visitEnd();
    }
   
    generate_on_load();

    generate_classinit();
View Full Code Here


    for (Map.Entry<BitSet,String> ent : bitsets.entrySet()) {
      BitSet bs = ent.getKey();
      String name = ent.getValue();
     
      FieldVisitor fv = cv.visitField(ACC_STATIC, name, Type.getDescriptor(BitSet.class), null, null);
      fv.visitEnd();
     
      byte[] bytes = bs.toByteArray();
      mv.visitLdcInsn(new String(bytes, StandardCharsets.ISO_8859_1));
      mv.visitLdcInsn("ISO-8859-1");
      mv.visitMethodInsn(INVOKEVIRTUAL, Type.getInternalName(String.class),
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

        }
        av0.visitEnd();

        List<Annotation> jaxbAnnos = getJaxbAnnos(mpi);
        addJAXBAnnotations(fv, jaxbAnnos);
        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

    // 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

            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

                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

        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

                 null, "com/sun/corba/se/impl/corba/AnyImpl", null);

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

        fv = cw.visitField(0, "obj", "Lorg/omg/CORBA/portable/Streamable;", null, null);
        fv.visitEnd();
        addFixedAnyConstructor(cw);
        addInsertOverride(cw);
        addExtractOverride(cw);
        addReadOverride(cw);
        addWriteOverride(cw);
View Full Code Here

        // TODO Also add the method flags for inner class methods.
        String id = generateMethodFlag(name, desc);
        if (! m_methodFlags.contains(id)) {
            FieldVisitor flagField = cv.visitField(0, id, "Z", null, null);
            flagField.visitEnd();
            m_methodFlags.add(id);
        }

        MethodVisitor mv = super.visitMethod(ACC_PRIVATE, PREFIX + name, desc, signature, exceptions);
        return new MethodCodeAdapter(mv, m_owner, ACC_PRIVATE, PREFIX + name, desc, m_fields);
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.