Package org.aspectj.weaver.patterns

Examples of org.aspectj.weaver.patterns.IScope


    try {
      PatternParser parser = new PatternParser(expression);
      parser.setPointcutDesignatorHandlers(pointcutDesignators, world);
      Pointcut pc = parser.parsePointcut();
      validateAgainstSupportedPrimitives(pc, expression);
      IScope resolutionScope = buildResolutionScope((inScope == null ? Object.class : inScope), formalParameters);
      pc = pc.resolve(resolutionScope);
      return pc;
    } catch (ParserException pEx) {
      throw new IllegalArgumentException(buildUserMessageFromParserException(expression, pEx));
    }
View Full Code Here


    try {
      PatternParser parser = new PatternParser(expression);
      parser.setPointcutDesignatorHandlers(pointcutDesignators, world);
      Pointcut pc = parser.parsePointcut();
      validateAgainstSupportedPrimitives(pc, expression);
      IScope resolutionScope = buildResolutionScope((inScope == null ? Object.class : inScope), formalParameters);
      pc = pc.resolve(resolutionScope);
      return pc;
    } catch (ParserException pEx) {
      throw new IllegalArgumentException(buildUserMessageFromParserException(expression, pEx));
    }
View Full Code Here

    this.world = new BcelWorld(classLoader, IMessageHandler.THROW, null);
    this.world.setBehaveInJava5Way(true);
    PatternParser patternParser = new PatternParser(typePatternExpression);
    TypePattern typePattern = patternParser.parseTypePattern();
    typePattern.resolve(this.world);
    IScope scope = new SimpleScope(this.world, new FormalBinding[0]);
    this.typePattern = typePattern.resolveBindings(scope, Bindings.NONE, false, false);
  }
View Full Code Here

        // FIXME asc see related comment way about about the version...
        struct.ajAttributes.add(new AjAttribute.WeaverVersionInfo());
        AjAttribute.Aspect aspectAttribute = new AjAttribute.Aspect(perClause);
        struct.ajAttributes.add(aspectAttribute);
        FormalBinding[] bindings = new org.aspectj.weaver.patterns.FormalBinding[0];
        final IScope binding;
        binding = new BindingScope(struct.enclosingType, struct.context, bindings);

        // // we can't resolve here since the perclause typically refers
        // to pointcuts
        // // defined in the aspect that we haven't told the
View Full Code Here

        ResolvedType fieldType = UnresolvedType.forSignature(struct.field.getSignature()).resolve(
            struct.enclosingType.getWorld());
        if (fieldType.isInterface()) {
          TypePattern parent = parseTypePattern(fieldType.getName(), struct);
          FormalBinding[] bindings = new org.aspectj.weaver.patterns.FormalBinding[0];
          IScope binding = new BindingScope(struct.enclosingType, struct.context, bindings);
          // first add the declare implements like
          List<TypePattern> parents = new ArrayList<TypePattern>(1);
          parents.add(parent);
          DeclareParents dp = new DeclareParents(typePattern, parents, false);
          dp.resolve(binding); // resolves the parent and child parts
View Full Code Here

      return false;
    }

    // Create the declare parents that will add the interfaces to matching targets
    FormalBinding[] bindings = new org.aspectj.weaver.patterns.FormalBinding[0];
    IScope binding = new BindingScope(struct.enclosingType, struct.context, bindings);
    // how do we mark this as a decp due to decmixin?
    DeclareParents dp = new DeclareParentsMixin(targetTypePattern, newParents);
    dp.resolve(binding);
    targetTypePattern = dp.getChild();
View Full Code Here

        try {
          bindings = extractBindings(struct);
        } catch (UnreadableDebugInfoException unreadableDebugInfoException) {
          return false;
        }
        IScope binding = new BindingScope(struct.enclosingType, struct.context, bindings);

        // joinpoint, staticJoinpoint binding
        int extraArgument = extractExtraArgument(struct.method);

        Pointcut pc = null;
View Full Code Here

        try {
          bindings = extractBindings(struct);
        } catch (UnreadableDebugInfoException unreadableDebugInfoException) {
          return false;
        }
        IScope binding = new BindingScope(struct.enclosingType, struct.context, bindings);

        // joinpoint, staticJoinpoint binding
        int extraArgument = extractExtraArgument(struct.method);

        Pointcut pc = null;
View Full Code Here

      try {
        bindings = (returned == null ? extractBindings(struct) : extractBindings(struct, returned));
      } catch (UnreadableDebugInfoException unreadableDebugInfoException) {
        return false;
      }
      IScope binding = new BindingScope(struct.enclosingType, struct.context, bindings);

      // joinpoint, staticJoinpoint binding
      int extraArgument = extractExtraArgument(struct.method);

      // return binding
View Full Code Here

      try {
        bindings = (thrownFormal == null ? extractBindings(struct) : extractBindings(struct, thrownFormal));
      } catch (UnreadableDebugInfoException unreadableDebugInfoException) {
        return false;
      }
      IScope binding = new BindingScope(struct.enclosingType, struct.context, bindings);

      // joinpoint, staticJoinpoint binding
      int extraArgument = extractExtraArgument(struct.method);

      // return binding
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.patterns.IScope

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.