Package org.deuce.objectweb.asm

Examples of org.deuce.objectweb.asm.MethodVisitor.visitMethodInsn()


      copyMethod.visitVarInsn(type.getOpcode(Opcodes.ILOAD), place);
      place += type.getSize();
    }
   
    // call the original method
    copyMethod.visitMethodInsn(isStatic ? Opcodes.INVOKESTATIC : Opcodes.INVOKEVIRTUAL, className, name, desc);
    TypeCodeResolver returnReolver = TypeCodeResolverFactory.getReolver(newMethod.getReturnType());
    if( returnReolver == null) {
      copyMethod.visitInsn( Opcodes.RETURN); // return;
    }else {
      copyMethod.visitInsn(returnReolver.returnCode());
View Full Code Here


      if(isEnum){ // Build a dummy ordinal() method
        MethodVisitor ordinalMethod =
          super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_SYNTHETIC, "ordinal", "(Lorg/deuce/transaction/Context;)I", null, null);
        ordinalMethod.visitCode();
        ordinalMethod.visitVarInsn(Opcodes.ALOAD, 0);
        ordinalMethod.visitMethodInsn(Opcodes.INVOKEVIRTUAL, className, "ordinal", "()I");
        ordinalMethod.visitInsn(Opcodes.IRETURN);
        ordinalMethod.visitMaxs(1, 2);
        ordinalMethod.visitEnd();
      }
    }
View Full Code Here

      mv.visitTryCatchBlock(l3, l4, l5, Names.Exception);
      Label l6 = new Label();
      mv.visitLabel(l6);
      //Call Super Class
      mv.visitVarInsn(ALOAD, 0);
      mv.visitMethodInsn(INVOKESPECIAL, Names.UniCastObject, "<init>", "()V");
      Label l7 = new Label();
      mv.visitLabel(l7);
 
      mv.visitMethodInsn(INVOKESTATIC, Names.Hyflow, "getLocator", Type.getMethodDescriptor(Type.getType(DirectoryManager.class), new Type [] {})); //"()Laleph/dir/DirectoryManager;");
      mv.visitTypeInsn(CHECKCAST, Names.ControlFlowDirectory);
View Full Code Here

      mv.visitVarInsn(ALOAD, 0);
      mv.visitMethodInsn(INVOKESPECIAL, Names.UniCastObject, "<init>", "()V");
      Label l7 = new Label();
      mv.visitLabel(l7);
 
      mv.visitMethodInsn(INVOKESTATIC, Names.Hyflow, "getLocator", Type.getMethodDescriptor(Type.getType(DirectoryManager.class), new Type [] {})); //"()Laleph/dir/DirectoryManager;");
      mv.visitTypeInsn(CHECKCAST, Names.ControlFlowDirectory);
      mv.visitVarInsn(ALOAD, 0);
      mv.visitMethodInsn(INVOKEVIRTUAL, Names.ControlFlowDirectory, "addProxy", Type.getMethodDescriptor(Type.VOID_TYPE, new Type[] {Type.getType(Object.class)})); //"(Ljava/lang/Object;)V");
      Label l8 = new Label();
      mv.visitLabel(l8);
View Full Code Here

      mv.visitLabel(l7);
 
      mv.visitMethodInsn(INVOKESTATIC, Names.Hyflow, "getLocator", Type.getMethodDescriptor(Type.getType(DirectoryManager.class), new Type [] {})); //"()Laleph/dir/DirectoryManager;");
      mv.visitTypeInsn(CHECKCAST, Names.ControlFlowDirectory);
      mv.visitVarInsn(ALOAD, 0);
      mv.visitMethodInsn(INVOKEVIRTUAL, Names.ControlFlowDirectory, "addProxy", Type.getMethodDescriptor(Type.VOID_TYPE, new Type[] {Type.getType(Object.class)})); //"(Ljava/lang/Object;)V");
      Label l8 = new Label();
      mv.visitLabel(l8);
 
      mv.visitMethodInsn(INVOKESTATIC, Names.System, "getSecurityManager", Type.getMethodDescriptor(Type.getType(SecurityManager.class), new Type[]{}));//"()Ljava/lang/SecurityManager;");
      Label l9 = new Label();
View Full Code Here

      mv.visitVarInsn(ALOAD, 0);
      mv.visitMethodInsn(INVOKEVIRTUAL, Names.ControlFlowDirectory, "addProxy", Type.getMethodDescriptor(Type.VOID_TYPE, new Type[] {Type.getType(Object.class)})); //"(Ljava/lang/Object;)V");
      Label l8 = new Label();
      mv.visitLabel(l8);
 
      mv.visitMethodInsn(INVOKESTATIC, Names.System, "getSecurityManager", Type.getMethodDescriptor(Type.getType(SecurityManager.class), new Type[]{}));//"()Ljava/lang/SecurityManager;");
      Label l9 = new Label();
      mv.visitJumpInsn(IFNONNULL, l9);
      Label l10 = new Label();
      mv.visitLabel(l10);
 
View Full Code Here

      Label l10 = new Label();
      mv.visitLabel(l10);
 
      mv.visitTypeInsn(NEW, Names.RMISecurityManager);
      mv.visitInsn(DUP);
      mv.visitMethodInsn(INVOKESPECIAL, Names.RMISecurityManager, "<init>", "()V");
      mv.visitMethodInsn(INVOKESTATIC, Names.System, "setSecurityManager", Type.getMethodDescriptor(Type.VOID_TYPE, new Type[] {Type.getType(SecurityManager.class)}));//"(Ljava/lang/SecurityManager;)V");
      mv.visitLabel(l9);
   
      mv.visitFrame(Opcodes.F_FULL, 1, new Object[] {proxyName}, 0, new Object[] {});
      mv.visitMethodInsn(INVOKESTATIC, Names.HyflowNetwork, "getInstance", Type.getMethodDescriptor(Type.getType(Network.class), new Type[]{}));//"()Ledu/vt/rt/hyflow/util/network/Network;");
View Full Code Here

      mv.visitLabel(l10);
 
      mv.visitTypeInsn(NEW, Names.RMISecurityManager);
      mv.visitInsn(DUP);
      mv.visitMethodInsn(INVOKESPECIAL, Names.RMISecurityManager, "<init>", "()V");
      mv.visitMethodInsn(INVOKESTATIC, Names.System, "setSecurityManager", Type.getMethodDescriptor(Type.VOID_TYPE, new Type[] {Type.getType(SecurityManager.class)}));//"(Ljava/lang/SecurityManager;)V");
      mv.visitLabel(l9);
   
      mv.visitFrame(Opcodes.F_FULL, 1, new Object[] {proxyName}, 0, new Object[] {});
      mv.visitMethodInsn(INVOKESTATIC, Names.HyflowNetwork, "getInstance", Type.getMethodDescriptor(Type.getType(Network.class), new Type[]{}));//"()Ledu/vt/rt/hyflow/util/network/Network;");
      mv.visitMethodInsn(INVOKEVIRTUAL, Names.HyflowNetwork, "getPort", "()I");
View Full Code Here

      mv.visitMethodInsn(INVOKESPECIAL, Names.RMISecurityManager, "<init>", "()V");
      mv.visitMethodInsn(INVOKESTATIC, Names.System, "setSecurityManager", Type.getMethodDescriptor(Type.VOID_TYPE, new Type[] {Type.getType(SecurityManager.class)}));//"(Ljava/lang/SecurityManager;)V");
      mv.visitLabel(l9);
   
      mv.visitFrame(Opcodes.F_FULL, 1, new Object[] {proxyName}, 0, new Object[] {});
      mv.visitMethodInsn(INVOKESTATIC, Names.HyflowNetwork, "getInstance", Type.getMethodDescriptor(Type.getType(Network.class), new Type[]{}));//"()Ledu/vt/rt/hyflow/util/network/Network;");
      mv.visitMethodInsn(INVOKEVIRTUAL, Names.HyflowNetwork, "getPort", "()I");
      mv.visitIntInsn(SIPUSH, 1000);
      mv.visitInsn(IADD);
      mv.visitVarInsn(ISTORE, 1);
      Label l11 = new Label();
View Full Code Here

      mv.visitMethodInsn(INVOKESTATIC, Names.System, "setSecurityManager", Type.getMethodDescriptor(Type.VOID_TYPE, new Type[] {Type.getType(SecurityManager.class)}));//"(Ljava/lang/SecurityManager;)V");
      mv.visitLabel(l9);
   
      mv.visitFrame(Opcodes.F_FULL, 1, new Object[] {proxyName}, 0, new Object[] {});
      mv.visitMethodInsn(INVOKESTATIC, Names.HyflowNetwork, "getInstance", Type.getMethodDescriptor(Type.getType(Network.class), new Type[]{}));//"()Ledu/vt/rt/hyflow/util/network/Network;");
      mv.visitMethodInsn(INVOKEVIRTUAL, Names.HyflowNetwork, "getPort", "()I");
      mv.visitIntInsn(SIPUSH, 1000);
      mv.visitInsn(IADD);
      mv.visitVarInsn(ISTORE, 1);
      Label l11 = new Label();
      mv.visitLabel(l11);
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.