Package org.springframework.asm

Examples of org.springframework.asm.FieldVisitor


      }
    };
  }

  private FieldVisitor createFieldVisitor(final ProjectModelImpl model, final String className, final FieldHandle mh) {
    return new FieldVisitor() {

      public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
        model.addMemberAnnotation(convertAnnotationDescriptor(desc), mh);
        return createAnnotationVisitor(model, mh, desc);
      }
View Full Code Here


  byte[] generateClassBytecode(String className, Class<? extends DataSerializable> clazz, int classId) {
    ClassWriter cw = new ClassWriter(0);

    cw.visit(V1_5, ACC_PUBLIC + ACC_SUPER, className, null, INSTANTIATOR_NAME, new String[] { SERIALIZABLE_NAME });
    FieldVisitor fv = cw.visitField(ACC_PRIVATE + ACC_FINAL + ACC_STATIC, CLASS_FIELD_NAME, CLASS_DESCRIPTOR, null,
        null);
    fv.visitEnd();
    fv = cw.visitField(ACC_PRIVATE + ACC_FINAL + ACC_STATIC, ID_FIELD_NAME, Type.INT_TYPE.getDescriptor(), null,
        Integer.valueOf(classId));
    fv.visitEnd();

    String voidNoArgMethodDescriptor = Type.getMethodDescriptor(Type.VOID_TYPE, new Type[] {});

    // field class loading
    MethodVisitor mv = cw.visitMethod(ACC_STATIC, CINIT, voidNoArgMethodDescriptor, null, null);
View Full Code Here

TOP

Related Classes of org.springframework.asm.FieldVisitor

Copyright © 2018 www.massapicom. 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.