Search in sources :

Example 1 with PointcutParser

use of org.aspectj.weaver.tools.PointcutParser in project spring-framework by spring-projects.

the class AspectJExpressionPointcut method initializePointcutParser.

/**
	 * Initialize the underlying AspectJ pointcut parser.
	 */
private PointcutParser initializePointcutParser(ClassLoader classLoader) {
    PointcutParser parser = PointcutParser.getPointcutParserSupportingSpecifiedPrimitivesAndUsingSpecifiedClassLoaderForResolution(SUPPORTED_PRIMITIVES, classLoader);
    parser.registerPointcutDesignatorHandler(new BeanPointcutDesignatorHandler());
    return parser;
}
Also used : PointcutParser(org.aspectj.weaver.tools.PointcutParser)

Example 2 with PointcutParser

use of org.aspectj.weaver.tools.PointcutParser in project spring-framework by spring-projects.

the class AspectJExpressionPointcut method buildPointcutExpression.

/**
	 * Build the underlying AspectJ pointcut expression.
	 */
private PointcutExpression buildPointcutExpression(ClassLoader classLoader) {
    PointcutParser parser = initializePointcutParser(classLoader);
    PointcutParameter[] pointcutParameters = new PointcutParameter[this.pointcutParameterNames.length];
    for (int i = 0; i < pointcutParameters.length; i++) {
        pointcutParameters[i] = parser.createPointcutParameter(this.pointcutParameterNames[i], this.pointcutParameterTypes[i]);
    }
    return parser.parsePointcutExpression(replaceBooleanOperators(getExpression()), this.pointcutDeclarationScope, pointcutParameters);
}
Also used : PointcutParameter(org.aspectj.weaver.tools.PointcutParameter) PointcutParser(org.aspectj.weaver.tools.PointcutParser)

Aggregations

PointcutParser (org.aspectj.weaver.tools.PointcutParser)2 PointcutParameter (org.aspectj.weaver.tools.PointcutParameter)1