Package org.aspectj.weaver.patterns

Examples of org.aspectj.weaver.patterns.FormalBinding$ImplicitFormalBinding


          || CharOperation.equals(joinPointStaticPart, argTypeBinding.signature())
          || CharOperation.equals(joinPointEnclosingStaticPart, argTypeBinding.signature())
          || CharOperation.equals(proceedingJoinPoint, argTypeBinding.signature()) || name.equals(extraArgName)) {
        ret[i] = new FormalBinding.ImplicitFormalBinding(type, name, i);
      } else {
        ret[i] = new FormalBinding(type, name, i, arg.sourceStart, arg.sourceEnd);
      }
    }
    return ret;
  }
View Full Code Here


        TypeVariableBinding[] tvs = parameters[i].typeVariables();
        if (tvs == null || tvs.length == 0) {
          type = type.getRawType();
        }
      }
      bindings[i] = new FormalBinding(type, name, i, arg.sourceStart, arg.sourceEnd);
    }

    EclipseScope scope = new EclipseScope(bindings, dec.scope);

    pointcut = pointcut.resolve(scope);
View Full Code Here

          || AjcMemberMaker.TYPEX_ENCLOSINGSTATICJOINPOINT.equals(argumentType) || AjcMemberMaker.AROUND_CLOSURE_TYPE
          .equals(argumentType))) {
        // continue;// skip
        bindings.add(new FormalBinding.ImplicitFormalBinding(argumentType, argumentName, i));
      } else {
        bindings.add(new FormalBinding(argumentType, argumentName, i));
      }
    }

    return bindings.toArray(new FormalBinding[] {});
  }
View Full Code Here

  private static FormalBinding[] extractBindings(AjAttributeMethodStruct struct, String excludeFormal)
      throws UnreadableDebugInfoException {
    FormalBinding[] bindings = extractBindings(struct);
    // int excludeIndex = -1;
    for (int i = 0; i < bindings.length; i++) {
      FormalBinding binding = bindings[i];
      if (binding.getName().equals(excludeFormal)) {
        // excludeIndex = i;
        bindings[i] = new FormalBinding.ImplicitFormalBinding(binding.getType(), binding.getName(), binding.getIndex());
        break;
      }
    }
    return bindings;
    //
View Full Code Here

  private static void setIgnoreUnboundBindingNames(Pointcut pointcut, FormalBinding[] bindings) {
    // register ImplicitBindings as to be ignored since unbound
    // TODO is it likely to fail in a bad way if f.e. this(jp) etc ?
    List<String> ignores = new ArrayList<String>();
    for (int i = 0; i < bindings.length; i++) {
      FormalBinding formalBinding = bindings[i];
      if (formalBinding instanceof FormalBinding.ImplicitFormalBinding) {
        ignores.add(formalBinding.getName());
      }
    }
    pointcut.m_ignoreUnboundBindingForNames = ignores.toArray(new String[ignores.size()]);
  }
View Full Code Here

          || CharOperation.equals(joinPointStaticPart, argTypeBinding.signature())
          || CharOperation.equals(joinPointEnclosingStaticPart, argTypeBinding.signature())
          || CharOperation.equals(proceedingJoinPoint, argTypeBinding.signature()) || name.equals(extraArgName)) {
        ret[i] = new FormalBinding.ImplicitFormalBinding(type, name, i);
      } else {
        ret[i] = new FormalBinding(type, name, i, arg.sourceStart, arg.sourceEnd);
      }
    }
    return ret;
  }
View Full Code Here

          || AjcMemberMaker.TYPEX_ENCLOSINGSTATICJOINPOINT.equals(argumentType) || AjcMemberMaker.AROUND_CLOSURE_TYPE
            .equals(argumentType))) {
        // continue;// skip
        bindings.add(new FormalBinding.ImplicitFormalBinding(argumentType, argumentName, i));
      } else {
        bindings.add(new FormalBinding(argumentType, argumentName, i));
      }
    }

    return bindings.toArray(new FormalBinding[] {});
  }
View Full Code Here

  private static FormalBinding[] extractBindings(AjAttributeMethodStruct struct, String excludeFormal)
      throws UnreadableDebugInfoException {
    FormalBinding[] bindings = extractBindings(struct);
    // int excludeIndex = -1;
    for (int i = 0; i < bindings.length; i++) {
      FormalBinding binding = bindings[i];
      if (binding.getName().equals(excludeFormal)) {
        // excludeIndex = i;
        bindings[i] = new FormalBinding.ImplicitFormalBinding(binding.getType(), binding.getName(), binding.getIndex());
        break;
      }
    }
    return bindings;
    //
View Full Code Here

  private static void setIgnoreUnboundBindingNames(Pointcut pointcut, FormalBinding[] bindings) {
    // register ImplicitBindings as to be ignored since unbound
    // TODO is it likely to fail in a bad way if f.e. this(jp) etc ?
    List<String> ignores = new ArrayList<String>();
    for (int i = 0; i < bindings.length; i++) {
      FormalBinding formalBinding = bindings[i];
      if (formalBinding instanceof FormalBinding.ImplicitFormalBinding) {
        ignores.add(formalBinding.getName());
      }
    }
    pointcut.m_ignoreUnboundBindingForNames = ignores.toArray(new String[ignores.size()]);
  }
View Full Code Here

    if (formalParameters == null) {
      formalParameters = new PointcutParameter[0];
    }
    FormalBinding[] formalBindings = new FormalBinding[formalParameters.length];
    for (int i = 0; i < formalBindings.length; i++) {
      formalBindings[i] = new FormalBinding(toUnresolvedType(formalParameters[i].getType()), formalParameters[i].getName(), i);
    }
    if (inScope == null) {
      SimpleScope ss = new SimpleScope(getWorld(), formalBindings);
      ss.setImportedPrefixes(new String[] { "java.lang.", "java.util." });
      return ss;
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.patterns.FormalBinding$ImplicitFormalBinding

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.