Package alt.jiapi.reflect

Examples of alt.jiapi.reflect.InstructionFactory.aload()


        // No API to set SourceFile!

        JiapiMethod method = c.addMethod(Modifier.PUBLIC, "<init>", emptySig);
        InstructionList il = method.getInstructionList();
        InstructionFactory iFactory = il.getInstructionFactory();
        il.add(iFactory.aload(0));
        il.add(iFactory.invoke(0, "java/lang/Object", "<init>", emptySig));
        il.add(iFactory.returnMethod(method));

        method = c.addMethod(Modifier.PUBLIC | Modifier.STATIC, "main", mainSig);
        il = method.getInstructionList();
View Full Code Here


                Instruction ins = advice.get(i);
                newList.add(ins);
                switch(ins.getOpcode()) {
                    // -- ALOAD family --------------------------------------
                    case Opcodes.ALOAD_0:
                        newList.replace(i, factory.aload(maxLocalsInOtherList));
                        break;
                    case Opcodes.ALOAD_1:
                        newList.replace(i, factory.aload(maxLocalsInOtherList + 1));
                        break;
                    case Opcodes.ALOAD_2:
View Full Code Here

                    // -- ALOAD family --------------------------------------
                    case Opcodes.ALOAD_0:
                        newList.replace(i, factory.aload(maxLocalsInOtherList));
                        break;
                    case Opcodes.ALOAD_1:
                        newList.replace(i, factory.aload(maxLocalsInOtherList + 1));
                        break;
                    case Opcodes.ALOAD_2:
                        newList.replace(i, factory.aload(maxLocalsInOtherList + 2));
                        break;
                    case Opcodes.ALOAD_3:
View Full Code Here

                        break;
                    case Opcodes.ALOAD_1:
                        newList.replace(i, factory.aload(maxLocalsInOtherList + 1));
                        break;
                    case Opcodes.ALOAD_2:
                        newList.replace(i, factory.aload(maxLocalsInOtherList + 2));
                        break;
                    case Opcodes.ALOAD_3:
                        newList.replace(i, factory.aload(maxLocalsInOtherList + 3));
                        break;
                    case Opcodes.ALOAD:
View Full Code Here

                        break;
                    case Opcodes.ALOAD_2:
                        newList.replace(i, factory.aload(maxLocalsInOtherList + 2));
                        break;
                    case Opcodes.ALOAD_3:
                        newList.replace(i, factory.aload(maxLocalsInOtherList + 3));
                        break;
                    case Opcodes.ALOAD:
                        // Handle this differently. This
                        // form of handling does not break exception table
                        // So, we minimize damage by handling this differently
View Full Code Here

      //view.add(factory.pushNull());
      view.add(factory.pushConstant(jm.getDeclaringClass().getName()));
      view.add(factory.invoke(Modifier.STATIC, "java.lang.Class", "forName", new Signature("java.lang.Class", new String[] {"java.lang.String"})));
        }
        else {
      view.add(factory.aload(0));
        }
                    // NOT IMPLEMENTED
                    // This needs some further thinking before implementing
                }
            }
View Full Code Here

                //       and use getField() instead of Class.forName() call
                // Class or objref; 1st parameter to interceptor
                if (opCode == Opcodes.GETSTATIC) {
                    short lvIdx =
                        addClassForNameInstructions(fa.getClassName(), jm);
                    nList.add(factory.aload(lvIdx));
//                     addClassForNameInstructions(fa.getClassName(), nList);
//                     nList.add(factory.pushNull());
                }
                else {
                    //addClassForNameInstructions(fa.getClassName(), nList);
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.