Package org.objectweb.asm

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


  public void visitEnd() {
    if (!isInterface) {
      FieldVisitor fv = cv.visitField(ACC_PUBLIC + ACC_STATIC, "timer",
          "J", null, null);
      if (fv != null) {
        fv.visitEnd();
      }
    }
    cv.visitEnd();
  }
View Full Code Here


    cv.visit(V1_6, ACC_PUBLIC, "pkg/Bean", null, "java/lang/Object",
        null);
    cv.visitSource("Bean.java", null);
    FieldVisitor fv = cv.visitField(ACC_PRIVATE, "f", "I", null, null);
    if (fv != null) {
      fv.visitEnd();
    }
    MethodVisitor mv;
    mv = cv.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
    if (mv != null) {
      mv.visitCode();
View Full Code Here

        // create static private method field
        FieldVisitor fv = cw.visitField(Opcodes.ACC_PRIVATE
                | Opcodes.ACC_STATIC, field_name, PROXY_METHOD_TYPE
                .getDescriptor(), null, null);
        fv.visitEnd();

        clazzInit.dup();
        clazzInit.push(m.getName());
        clazzInit.push(m.getDescriptor());
        clazzInit.push(md.isImplemented());
View Full Code Here

  }

  private void createField(JVMField field) {
    FieldVisitor fv = cw.visitField(ACC_PUBLIC | (field.isStatic() ? ACC_STATIC : 0), field.varName(), field
        .type().descriptorString(), null, null);
    fv.visitEnd();
  }

  public Class<?> createClass() {
    byte[] bytes = createBytes();
//    if (jvmClass.type().dottedClassName().equals("st.gravel.lang.Float$Factory"))
View Full Code Here

            an.visit("fun", fun_name.getName());
            an.visit("arity", new Integer(arity));
            an.visitEnd();
          }

          fv.visitEnd();

          funs.put(mname, full_inner_name);
          funt.put(mname, fun_type);
          EFunCG.ensure(arity);
          make_fun = true;
View Full Code Here

          FieldVisitor fv = visitField(ACC_STATIC + ACC_SYNTHETIC + ACC_FINAL
              + (isInterface?ACC_PUBLIC:ACC_PRIVATE),
                fieldName,
                CLASS_FIELD_DESC,
                null, null);
          fv.visitEnd();
        }

        if (!isInterface) {
          // "class$" method
          String exceptionTable[] = { JAVA_LANG_NOCLASSDEFFOUNDERROR };
View Full Code Here

      }
      public void visitAttribute( Attribute attr ) {
        v.visitAttribute( attr );
      }
      public void  visitEnd() {
        v.visitEnd();
      }
    };
  }

  public MethodVisitor visitMethod( int access, String name, String desc, String signature, String[] exceptions ) {
View Full Code Here

          FieldVisitor fv = visitField(ACC_STATIC + ACC_SYNTHETIC + ACC_FINAL
              + (isInterface?ACC_PUBLIC:ACC_PRIVATE),
                fieldName,
                CLASS_FIELD_DESC,
                null, null);
          fv.visitEnd();
        }

        if (!isInterface) {
          // "class$" method
          String exceptionTable[] = { JAVA_LANG_NOCLASSDEFFOUNDERROR };
View Full Code Here

          FieldVisitor fv = visitField(ACC_STATIC + ACC_SYNTHETIC + ACC_FINAL
              + (isInterface?ACC_PUBLIC:ACC_PRIVATE),
                fieldName,
                CLASS_FIELD_DESC,
                null, null);
          fv.visitEnd();
        }

        if (!isInterface) {
          // "class$" method
          String exceptionTable[] = { JAVA_LANG_NOCLASSDEFFOUNDERROR };
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

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.