Package org.aspectj.weaver.ast

Examples of org.aspectj.weaver.ast.Expr


    // System.out.println("args: " + Arrays.asList(args));
    InstructionList callIl = new InstructionList();
    for (int i = 0, len = args.length; i < len; i++) {
      // XXX only correct for static method calls
      Type desiredType = BcelWorld.makeBcelType(method.getParameterTypes()[i]);
      Expr arg = args[i];
      // if arg is null it is because we couldn't bind it properly, for example see 162135
      if (arg == null) {
        InstructionList iList = new InstructionList();
        iList.append(InstructionFactory.createNull(desiredType));
        callIl.append(iList);
View Full Code Here


    ret.copyLocationFrom(this);
    return ret;
  }

  protected Test findResidueInternal(Shadow shadow, ExposedState state) {
    Expr myInstance = Expr.makeCallExpr(AjcMemberMaker.perCflowAspectOfMethod(inAspect), Expr.NONE, inAspect);
    state.setAspectInstance(myInstance);
    return Test.makeCall(AjcMemberMaker.perCflowHasAspectMethod(inAspect), Expr.NONE);
  }
View Full Code Here

    // if (!Ajc5MemberMaker.isSlowAspect(inAspect)) {
    if (perSingletonAspectOfMethod == null) {
      // Build this just once
      perSingletonAspectOfMethod = AjcMemberMaker.perSingletonAspectOfMethod(inAspect);
    }
    Expr myInstance = Expr.makeCallExpr(perSingletonAspectOfMethod, Expr.NONE, inAspect);

    state.setAspectInstance(myInstance);

    // we have no test
    // a NoAspectBoundException will be thrown if we need an instance of
View Full Code Here

  protected Test findResidueInternal(Shadow shadow, ExposedState state) {
    // Member ptwField =
    // AjcMemberMaker.perTypeWithinField(shadow.getEnclosingType
    // (),inAspect);

    Expr myInstance = Expr.makeCallExpr(AjcMemberMaker.perTypeWithinLocalAspectOf(shadow.getEnclosingType(), inAspect/*
                                                             * shadow.
                                                             * getEnclosingType
                                                             * ( )
                                                             */),
        Expr.NONE, inAspect);
View Full Code Here

  private Var getVar(Shadow shadow) {
    return isThis ? shadow.getThisVar() : shadow.getTargetVar();
  }

  protected Test findResidueInternal(Shadow shadow, ExposedState state) {
    Expr myInstance = Expr.makeCallExpr(AjcMemberMaker.perObjectAspectOfMethod(inAspect), new Expr[] { getVar(shadow) },
        inAspect);
    state.setAspectInstance(myInstance);
    return Test.makeCall(AjcMemberMaker.perObjectHasAspectMethod(inAspect), new Expr[] { getVar(shadow) });
  }
View Full Code Here

    Expr[] args = call.getArgs();
    InstructionList callIl = new InstructionList();
    for (int i = 0, len = args.length; i < len; i++) {
      // XXX only correct for static method calls
      Type desiredType = BcelWorld.makeBcelType(method.getParameterTypes()[i]);
      Expr arg = args[i];
      // if arg is null it is because we couldn't bind it properly, for example see 162135
      if (arg == null) {
        InstructionList iList = new InstructionList();
        iList.append(InstructionFactory.createNull(desiredType));
        callIl.append(iList);
View Full Code Here

    // System.out.println("args: " + Arrays.asList(args));
    InstructionList callIl = new InstructionList();
    for (int i = 0, len = args.length; i < len; i++) {
      // XXX only correct for static method calls
      Type desiredType = BcelWorld.makeBcelType(method.getParameterTypes()[i]);
      Expr arg = args[i];
      // if arg is null it is because we couldn't bind it properly, for example see 162135
      if (arg == null) {
        InstructionList iList = new InstructionList();
        iList.append(InstructionFactory.createNull(desiredType));
        callIl.append(iList);
View Full Code Here

    ret.copyLocationFrom(this);
    return ret;
  }

  protected Test findResidueInternal(Shadow shadow, ExposedState state) {
    Expr myInstance = Expr.makeCallExpr(AjcMemberMaker.perCflowAspectOfMethod(inAspect), Expr.NONE, inAspect);
    state.setAspectInstance(myInstance);
    return Test.makeCall(AjcMemberMaker.perCflowHasAspectMethod(inAspect), Expr.NONE);
  }
View Full Code Here

        //      // we have no test
        //      // a NoAspectBoundException will be thrown if we need an instance of this
        //      // aspect before we are bound
        //        return Literal.TRUE;
//        if (!Ajc5MemberMaker.isSlowAspect(inAspect)) {
            Expr myInstance =
                Expr.makeCallExpr(AjcMemberMaker.perSingletonAspectOfMethod(inAspect),
                                    Expr.NONE, inAspect);

            state.setAspectInstance(myInstance);
View Full Code Here

      ret.copyLocationFrom(this);
      return ret;
    }
   
    protected Test findResidueInternal(Shadow shadow, ExposedState state) {
      Expr myInstance =
        Expr.makeCallExpr(AjcMemberMaker.perCflowAspectOfMethod(inAspect),
                  Expr.NONE, inAspect);
      state.setAspectInstance(myInstance);
      return Test.makeCall(AjcMemberMaker.perCflowHasAspectMethod(inAspect), Expr.NONE);
    }
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.ast.Expr

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.