Package br.com.caelum.vraptor.asm

Examples of br.com.caelum.vraptor.asm.MethodVisitor.visitCode()


    cw.visit(V1_5, ACC_PUBLIC + ACC_SUPER, newTypeName, null, "java/lang/Object", new String[] {"java/io/Serializable"});

    {
      MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
      mv.visitCode();
      mv.visitVarInsn(ALOAD, 0);
      mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
      mv.visitInsn(RETURN);
      mv.visitMaxs(1, 1);
      mv.visitEnd();
View Full Code Here


      fv.visitEnd();
    }
    {
      MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "set" + fieldName, "(" + definition + ")V",
          genericDefinition == null ? null : "(" + genericDefinition + ")V", null);
      mv.visitCode();
      mv.visitVarInsn(ALOAD, 0);
      mv.visitVarInsn(loadKey, 1);
      mv.visitFieldInsn(PUTFIELD, newTypeName, fieldName + "_", definition);
      mv.visitInsn(RETURN);
      mv.visitMaxs(3, 3);
View Full Code Here

      mv.visitEnd();
    }
    {
      MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "get" + fieldName, "()" + definition,
          genericDefinition == null ? null : "()" + genericDefinition, null);
      mv.visitCode();
      mv.visitVarInsn(ALOAD, 0);
      mv.visitFieldInsn(GETFIELD, newTypeName, fieldName + "_", definition);
      mv.visitInsn(returnKey);
      mv.visitMaxs(1, 1);
      mv.visitEnd();
View Full Code Here

    cw.visit(V1_5, ACC_PUBLIC + ACC_SUPER, newTypeName, null, "java/lang/Object", new String[] {"java/io/Serializable"});

    {
      MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
      mv.visitCode();
      mv.visitVarInsn(ALOAD, 0);
      mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
      mv.visitInsn(RETURN);
      mv.visitMaxs(1, 1);
      mv.visitEnd();
View Full Code Here

      fv.visitEnd();
    }
    {
      MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "set" + fieldName, "(" + definition + ")V",
          genericDefinition == null ? null : "(" + genericDefinition + ")V", null);
      mv.visitCode();
      mv.visitVarInsn(ALOAD, 0);
      mv.visitVarInsn(loadKey, 1);
      mv.visitFieldInsn(PUTFIELD, newTypeName, fieldName + "_", definition);
      mv.visitInsn(RETURN);
      mv.visitMaxs(3, 3);
View Full Code Here

      mv.visitEnd();
    }
    {
      MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "get" + fieldName, "()" + definition,
          genericDefinition == null ? null : "()" + genericDefinition, null);
      mv.visitCode();
      mv.visitVarInsn(ALOAD, 0);
      mv.visitFieldInsn(GETFIELD, newTypeName, fieldName + "_", definition);
      mv.visitInsn(returnKey);
      mv.visitMaxs(1, 1);
      mv.visitEnd();
View Full Code Here

    cw.visit(V1_5, ACC_PUBLIC + ACC_SUPER, newTypeName, null, "java/lang/Object", new String[] {"java/io/Serializable"});

    {
      MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
      mv.visitCode();
      mv.visitVarInsn(ALOAD, 0);
      mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
      mv.visitInsn(RETURN);
      mv.visitMaxs(1, 1);
      mv.visitEnd();
View Full Code Here

      fv.visitEnd();
    }
    {
      MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "set" + fieldName, "(" + definition + ")V",
          genericDefinition == null ? null : "(" + genericDefinition + ")V", null);
      mv.visitCode();
      mv.visitVarInsn(ALOAD, 0);
      mv.visitVarInsn(loadKey, 1);
      mv.visitFieldInsn(PUTFIELD, newTypeName, fieldName + "_", definition);
      mv.visitInsn(RETURN);
      mv.visitMaxs(3, 3);
View Full Code Here

      mv.visitEnd();
    }
    {
      MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "get" + fieldName, "()" + definition,
          genericDefinition == null ? null : "()" + genericDefinition, null);
      mv.visitCode();
      mv.visitVarInsn(ALOAD, 0);
      mv.visitFieldInsn(GETFIELD, newTypeName, fieldName + "_", definition);
      mv.visitInsn(returnKey);
      mv.visitMaxs(1, 1);
      mv.visitEnd();
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.