Package org.aspectj.apache.bcel.generic

Examples of org.aspectj.apache.bcel.generic.ALOAD


            // special logic when withincode is static or not
            int startIndex = 0;
            if (thisVar != null) {
                startIndex = 1;
                //TODO this logic is actually depending on target as well - test me
                ret.append(new ALOAD(0));//thisVar
            }
            for (int i = startIndex, len=callbackMethod.getArgumentTypes().length; i < len; i++) {
                Type stateType = callbackMethod.getArgumentTypes()[i];
                BcelWorld.fromBcel(stateType).resolve(world);
                if ("Lorg/aspectj/lang/JoinPoint;".equals(stateType.getSignature())) {
                    ret.append(new ALOAD(localJp));// from localAdvice signature
                } else {
                    ret.append(InstructionFactory.createLoad(objectArrayType, localProceedArgArray));
                    ret.append(Utility.createConstant(fact, i-startIndex));
                    ret.append(InstructionFactory.createArrayLoad(Type.OBJECT));
                    ret.append(Utility.createConversion(
                            fact,
                            Type.OBJECT,
                            stateType
                    ));
                }
            }
        } else {
            Type proceedingJpType = Type.getType("Lorg/aspectj/lang/ProceedingJoinPoint;");
            int localJp = localAdviceMethod.allocateLocal(proceedingJpType);
            ret.append(InstructionFactory.createStore(proceedingJpType, localJp));

            for (int i = 0, len=callbackMethod.getArgumentTypes().length; i < len; i++) {
                Type stateType = callbackMethod.getArgumentTypes()[i];
                /*ResolvedType stateTypeX =*/
                BcelWorld.fromBcel(stateType).resolve(world);
                if ("Lorg/aspectj/lang/JoinPoint;".equals(stateType.getSignature())) {
                    ret.append(new ALOAD(localJp));// from localAdvice signature
//                } else if ("Lorg/aspectj/lang/ProceedingJoinPoint;".equals(stateType.getSignature())) {
//                    //FIXME ALEX?
//                        ret.append(new ALOAD(localJp));// from localAdvice signature
////                        ret.append(fact.createCheckCast(
////                                (ReferenceType) BcelWorld.makeBcelType(stateTypeX)
View Full Code Here

TOP

Related Classes of org.aspectj.apache.bcel.generic.ALOAD

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.