Package org.aspectj.util

Examples of org.aspectj.util.FuzzyBoolean$NeverFuzzyBoolean


      for (Iterator i = factory.getWorld().getDeclareSoft().iterator(); i.hasNext(); ) {
        DeclareSoft d = (DeclareSoft)i.next();
        // We need the exceptionType to match the type in the declare soft statement
        // This means it must either be the same type or a subtype
        ResolvedType throwException = factory.fromEclipse((ReferenceBinding)exceptionType);
        FuzzyBoolean isExceptionTypeOrSubtype =
          d.getException().matchesInstanceof(throwException);
        if (!isExceptionTypeOrSubtype.alwaysTrue() ) continue;

        if (callSite != null) {
          FuzzyBoolean match = d.getPointcut().match(callSite);
          if (match.alwaysTrue()) {
            //System.err.println("matched callSite: "  + callSite + " with " + d);
            return;
          } else if (!match.alwaysFalse()) {
            //!!! need this check to happen much sooner
            //throw new RuntimeException("unimplemented, shouldn't have fuzzy match here");
          }
        }
        if (enclosingExec != null) {
          FuzzyBoolean match = d.getPointcut().match(enclosingExec);
          if (match.alwaysTrue()) {
            //System.err.println("matched enclosingExec: "  + enclosingExec + " with " + d);
            return;
          } else if (!match.alwaysFalse()) {
            //!!! need this check to happen much sooner
            //throw new RuntimeException("unimplemented, shouldn't have fuzzy match here");
          }
        }
      }
View Full Code Here


  public FuzzyBoolean fastMatch(FastMatchInfo type) {
    return left.fastMatch(type).and(right.fastMatch(type));
  }
 
  protected FuzzyBoolean matchInternal(Shadow shadow) {
    FuzzyBoolean leftMatch = left.match(shadow);
    if (leftMatch.alwaysFalse()) return leftMatch;
    return leftMatch.and(right.match(shadow));
  }
View Full Code Here

    List result = new ArrayList();
    Iterator iter = list.iterator();
    while (iter.hasNext()) {
      ShadowMunger munger = (ShadowMunger)iter.next();
      FuzzyBoolean fb = munger.getPointcut().fastMatch(info);
      WeaverMetrics.recordFastMatchTypeResult(fb); // Could pass: munger.getPointcut().toString(),info
      if (fb.maybeTrue()) {
        result.add(munger);
      }
    }
    return result;
  }
View Full Code Here

   * Do I really match this shadow?
   * XXX implementors need to handle state
   */
  public final FuzzyBoolean match(Shadow shadow) {
    if (shadow.shadowId == lastMatchedShadowId) return lastMatchedShadowResult;
    FuzzyBoolean ret;
    // this next test will prevent a lot of un-needed matching going on....
    if (couldMatchKinds().contains(shadow.getKind())) {
      ret = matchInternal(shadow);
    } else {
      ret = FuzzyBoolean.NO;
View Full Code Here

  public FuzzyBoolean fastMatch(FastMatchInfo type) {
    return left.fastMatch(type).or(right.fastMatch(type));
  }
 
  protected FuzzyBoolean matchInternal(Shadow shadow) {
    FuzzyBoolean leftMatch = left.match(shadow);
    if (leftMatch.alwaysTrue()) return leftMatch;
    return leftMatch.or(right.match(shadow));
  }
View Full Code Here

  /* (non-Javadoc)
   * @see org.aspectj.weaver.patterns.Pointcut#match(org.aspectj.weaver.Shadow)
   */
  protected FuzzyBoolean matchInternal(Shadow shadow) {
    arguments.resolve(shadow.getIWorld());
    FuzzyBoolean ret =
      arguments.matches(shadow.getIWorld().resolve(shadow.getArgTypes()));
    return ret;
  }
View Full Code Here

    return FuzzyBoolean.MAYBE;
  }
 
  protected FuzzyBoolean matchInternal(Shadow shadow) {
    ResolvedType[] argumentsToMatchAgainst = getArgumentsToMatchAgainst(shadow);
    FuzzyBoolean ret =
      arguments.matches(argumentsToMatchAgainst, TypePattern.DYNAMIC);
    return ret;
  }
View Full Code Here

    // do the hard work then...
    boolean subjectMatch = true;
    Iterator candidateMatches = joinPointSignature.getJoinPointSignatures(world);
    while(candidateMatches.hasNext()) {
      JoinPointSignature aSig = (JoinPointSignature) candidateMatches.next();
      FuzzyBoolean matchResult = matchesExactly(aSig,world,allowBridgeMethods,subjectMatch);
      if (matchResult.alwaysTrue()) {
        return true;
      } else if (matchResult.alwaysFalse()) {
        return false;
      }
      // if we got a "MAYBE" it's worth looking at the other signatures
      subjectMatch = false;
    }
View Full Code Here

//      if (aMember.isPrivate()) return FuzzyBoolean.NO;
//      else return FuzzyBoolean.MAYBE;
    }
   
   
    FuzzyBoolean matchesIgnoringAnnotations = FuzzyBoolean.YES;
    if (kind == Member.STATIC_INITIALIZATION) {
      matchesIgnoringAnnotations = matchesExactlyStaticInitialization(aMember, inAWorld);
    } else if (kind == Member.FIELD) {
      matchesIgnoringAnnotations = matchesExactlyField(aMember,inAWorld);
    } else if (kind == Member.METHOD) {
      matchesIgnoringAnnotations = matchesExactlyMethod(aMember,inAWorld, subjectMatch);
    } else if (kind == Member.CONSTRUCTOR) {
      matchesIgnoringAnnotations = matchesExactlyConstructor(aMember, inAWorld);
    }
    if (matchesIgnoringAnnotations.alwaysFalse()) return FuzzyBoolean.NO;
   
    // annotations match on the *subject*
    if (subjectMatch && !matchesAnnotations(aMember,inAWorld).alwaysTrue()) {
      return FuzzyBoolean.NO;
    } else {
View Full Code Here

  {
    Question question = new Question(pattern, type, kind);
    //??? should we use this table to do caching or is that a pessimization
    //??? if we do that optimization we can also do error checking that the result
    //??? doesn't change
    FuzzyBoolean answer = question.ask();
    questionsAndAnswers.put(question, answer);
    return answer;
  }
View Full Code Here

TOP

Related Classes of org.aspectj.util.FuzzyBoolean$NeverFuzzyBoolean

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.