org.aspectj.weaver.tools.PointcutPrimitive Java Examples

The following examples show how to use org.aspectj.weaver.tools.PointcutPrimitive. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AspectJExpressionPointcutTests.java    From spring-analysis-note with MIT License 5 votes vote down vote up
@Test
public void testWithUnsupportedPointcutPrimitive() {
	String expression = "call(int org.springframework.tests.sample.beans.TestBean.getAge())";

	try {
		getPointcut(expression).getClassFilter(); // call to getClassFilter forces resolution...
		fail("Should not support call pointcuts");
	}
	catch (UnsupportedPointcutPrimitiveException ex) {
		assertEquals("Should not support call pointcut", PointcutPrimitive.CALL, ex.getUnsupportedPrimitive());
	}
}
 
Example #2
Source File: AspectJExpressionPointcutTests.java    From java-technology-stack with MIT License 5 votes vote down vote up
@Test
public void testWithUnsupportedPointcutPrimitive() {
	String expression = "call(int org.springframework.tests.sample.beans.TestBean.getAge())";

	try {
		getPointcut(expression).getClassFilter(); // call to getClassFilter forces resolution...
		fail("Should not support call pointcuts");
	}
	catch (UnsupportedPointcutPrimitiveException ex) {
		assertEquals("Should not support call pointcut", PointcutPrimitive.CALL, ex.getUnsupportedPrimitive());
	}
}
 
Example #3
Source File: AspectJExpressionPointcutTests.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
@Test
public void testWithUnsupportedPointcutPrimitive() throws Exception {
	String expression = "call(int org.springframework.tests.sample.beans.TestBean.getAge())";

	try {
		getPointcut(expression).getClassFilter(); // call to getClassFilter forces resolution...
		fail("Should not support call pointcuts");
	}
	catch (UnsupportedPointcutPrimitiveException ex) {
		assertEquals("Should not support call pointcut", PointcutPrimitive.CALL, ex.getUnsupportedPrimitive());
	}

}
 
Example #4
Source File: ProxyPointcut.java    From doodle with Apache License 2.0 4 votes vote down vote up
public ProxyPointcut(Set<PointcutPrimitive> supportedPrimitives) {
    pointcutParser = PointcutParser
            .getPointcutParserSupportingSpecifiedPrimitivesAndUsingContextClassloaderForResolution(supportedPrimitives);
}
 
Example #5
Source File: AspectJExpressionPointcut.java    From toy-spring with Apache License 2.0 4 votes vote down vote up
public AspectJExpressionPointcut(Set<PointcutPrimitive> supportedPrimitives) {
    pointcutParser = PointcutParser
            .getPointcutParserSupportingSpecifiedPrimitivesAndUsingContextClassloaderForResolution(supportedPrimitives);
}
 
Example #6
Source File: AspectJExpressionPointcut.java    From tiny-spring with Apache License 2.0 4 votes vote down vote up
public AspectJExpressionPointcut(Set<PointcutPrimitive> supportedPrimitives) {
	pointcutParser = PointcutParser
			.getPointcutParserSupportingSpecifiedPrimitivesAndUsingContextClassloaderForResolution(supportedPrimitives);
}
 
Example #7
Source File: AspectJExpressionPointcut.java    From tiny-spring with Apache License 2.0 4 votes vote down vote up
public AspectJExpressionPointcut(Set<PointcutPrimitive> supportedPrimitives) {
	pointcutParser = PointcutParser
			.getPointcutParserSupportingSpecifiedPrimitivesAndUsingContextClassloaderForResolution(supportedPrimitives);
}
 
Example #8
Source File: AspectJExpressionPointcut.java    From tiny-spring with Apache License 2.0 4 votes vote down vote up
public AspectJExpressionPointcut(Set<PointcutPrimitive> supportedPrimitives) {
	pointcutParser = PointcutParser
			.getPointcutParserSupportingSpecifiedPrimitivesAndUsingContextClassloaderForResolution(supportedPrimitives);
}