/** * Get a new pointcut expression based on a target class's loader rather than the default. */ @Nullable private PointcutExpression getFallbackPointcutExpression(Class<?> targetClass) { try { ClassLoader classLoader = targetClass.getClassLoader(); if (classLoader != null && classLoader != this.pointcutClassLoader) { return buildPointcutExpression(classLoader); } } catch (Throwable ex) { logger.debug("Failed to create fallback PointcutExpression", ex); } return null; }
/** * Check whether this pointcut is ready to match, * lazily building the underlying AspectJ pointcut expression. */ private PointcutExpression obtainPointcutExpression() { if (getExpression() == null) { throw new IllegalStateException("Must set property 'expression' before attempting to match"); } if (this.pointcutExpression == null) { this.pointcutClassLoader = determinePointcutClassLoader(); this.pointcutExpression = buildPointcutExpression(this.pointcutClassLoader); } return this.pointcutExpression; }
/** * Get a new pointcut expression based on a target class's loader rather than the default. */ @Nullable private PointcutExpression getFallbackPointcutExpression(Class<?> targetClass) { try { ClassLoader classLoader = targetClass.getClassLoader(); if (classLoader != null && classLoader != this.pointcutClassLoader) { return buildPointcutExpression(classLoader); } } catch (Throwable ex) { logger.debug("Failed to create fallback PointcutExpression", ex); } return null; }
/** * Check whether this pointcut is ready to match, * lazily building the underlying AspectJ pointcut expression. */ private PointcutExpression obtainPointcutExpression() { if (getExpression() == null) { throw new IllegalStateException("Must set property 'expression' before attempting to match"); } if (this.pointcutExpression == null) { this.pointcutClassLoader = determinePointcutClassLoader(); this.pointcutExpression = buildPointcutExpression(this.pointcutClassLoader); } return this.pointcutExpression; }
this.pointcutExpression = buildPointcutExpression(this.pointcutClassLoader);