Package org.aspectj.weaver.reflect

Examples of org.aspectj.weaver.reflect.ShadowMatchImpl


    return sm;
  }

  public ShadowMatch matchesFieldGet(Field aField, Class withinType) {
    Shadow s = ReflectionShadow.makeFieldGetShadow(world, aField, withinType, this.matchContext);
    ShadowMatchImpl sm = getShadowMatch(s);
    sm.setSubject(aField);
    sm.setWithinCode(null);
    sm.setWithinType(withinType);
    return sm;
  }
View Full Code Here


    return sm;
  }

  public ShadowMatch matchesFieldGet(Field aField, Member withinCode) {
    Shadow s = ReflectionShadow.makeFieldGetShadow(world, aField, withinCode, this.matchContext);
    ShadowMatchImpl sm = getShadowMatch(s);
    sm.setSubject(aField);
    sm.setWithinCode(withinCode);
    sm.setWithinType(withinCode.getDeclaringClass());
    return sm;
  }
View Full Code Here

    return sm;
  }

  public ShadowMatch matchesFieldSet(Field aField, Class withinType) {
    Shadow s = ReflectionShadow.makeFieldSetShadow(world, aField, withinType, this.matchContext);
    ShadowMatchImpl sm = getShadowMatch(s);
    sm.setSubject(aField);
    sm.setWithinCode(null);
    sm.setWithinType(withinType);
    return sm;
  }
View Full Code Here

    return sm;
  }

  public ShadowMatch matchesFieldSet(Field aField, Member withinCode) {
    Shadow s = ReflectionShadow.makeFieldSetShadow(world, aField, withinCode, this.matchContext);
    ShadowMatchImpl sm = getShadowMatch(s);
    sm.setSubject(aField);
    sm.setWithinCode(withinCode);
    sm.setWithinType(withinCode.getDeclaringClass());
    return sm;
  }
View Full Code Here

    Test residueTest = Literal.TRUE;
    ExposedState state = getExposedState();
    if (match.maybeTrue()) {
      residueTest = pointcut.findResidue(forShadow, state);
    }
    ShadowMatchImpl sm = new ShadowMatchImpl(match, residueTest, state, parameters);
    sm.setMatchingContext(this.matchContext);
    return sm;
  }
View Full Code Here

    return matchesExecution(aConstructor);
  }

  private ShadowMatch matchesExecution(Member aMember) {
    Shadow s = ReflectionShadow.makeExecutionShadow(world, aMember, this.matchContext);
    ShadowMatchImpl sm = getShadowMatch(s);
    sm.setSubject(aMember);
    sm.setWithinCode(null);
    sm.setWithinType(aMember.getDeclaringClass());
    return sm;
  }
View Full Code Here

            try {
              fallbackPointcutExpression = getFallbackPointcutExpression(methodToMatch.getDeclaringClass());
              shadowMatch = fallbackPointcutExpression.matchesMethodExecution(methodToMatch);
            } catch (ReflectionWorld.ReflectionWorldException e) {
              if (targetMethod == originalMethod) {
                shadowMatch = new ShadowMatchImpl(org.aspectj.util.FuzzyBoolean.NO, null, null, null);
              }
              else {
                try {
                  shadowMatch = this.pointcutExpression.matchesMethodExecution(originalMethod);
                }
                catch (ReflectionWorld.ReflectionWorldException ex2) {
                  // Could neither introspect the target class nor the proxy class ->
                  // let's simply consider this method as non-matching.
                  methodToMatch = originalMethod;
                  fallbackPointcutExpression = getFallbackPointcutExpression(methodToMatch.getDeclaringClass());
                  try {
                    shadowMatch = fallbackPointcutExpression.matchesMethodExecution(methodToMatch);
                  } catch (ReflectionWorld.ReflectionWorldException e2) {
                    shadowMatch = new ShadowMatchImpl(org.aspectj.util.FuzzyBoolean.NO, null, null, null);
                  }
                }
              }
            }
          }
View Full Code Here

  private final Test runtimeTest;


  public RuntimeTestWalker(ShadowMatch shadowMatch) {
    ShadowMatchImpl shadowMatchImplementation = (ShadowMatchImpl) shadowMatch;
    try {
      Field testField = shadowMatchImplementation.getClass().getDeclaredField("residualTest");
      ReflectionUtils.makeAccessible(testField);
      this.runtimeTest = (Test) testField.get(shadowMatch);
    }
    catch (NoSuchFieldException noSuchFieldEx) {
      throw new IllegalStateException("The version of aspectjtools.jar / aspectjweaver.jar " +
View Full Code Here

  private final Test runtimeTest;


  public RuntimeTestWalker(ShadowMatch shadowMatch) {
    ShadowMatchImpl shadowMatchImplementation = (ShadowMatchImpl) shadowMatch;
    try {
      Field testField = shadowMatchImplementation.getClass().getDeclaredField("residualTest");
      ReflectionUtils.makeAccessible(testField);
      this.runtimeTest = (Test) testField.get(shadowMatch);
    }
    catch (NoSuchFieldException noSuchFieldEx) {
      throw new IllegalStateException("The version of aspectjtools.jar / aspectjweaver.jar " +
View Full Code Here

  private final Test runtimeTest;


  public RuntimeTestWalker(ShadowMatch shadowMatch) {
    ShadowMatchImpl shadowMatchImplementation = (ShadowMatchImpl) shadowMatch;
    try {
      Field testField = shadowMatchImplementation.getClass().getDeclaredField("residualTest");
      testField.setAccessible(true);
      this.runtimeTest = (Test) testField.get(shadowMatch);
    }
    catch (NoSuchFieldException noSuchFieldEx) {
      throw new IllegalStateException("The version of aspectjtools.jar / aspectjweaver.jar " +
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.reflect.ShadowMatchImpl

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.