aboutsummaryrefslogtreecommitdiffstats
path: root/weaver5/java5-testsrc
diff options
context:
space:
mode:
authoracolyer <acolyer>2006-04-14 16:41:58 +0000
committeracolyer <acolyer>2006-04-14 16:41:58 +0000
commit064c5145535c166d52252e010828e9994b3e7635 (patch)
tree140857baa9360f71df78886d9767c65e71458729 /weaver5/java5-testsrc
parent3e0fc355acc7c525ca290d4740ff7ca70edf408c (diff)
downloadaspectj-064c5145535c166d52252e010828e9994b3e7635.tar.gz
aspectj-064c5145535c166d52252e010828e9994b3e7635.zip
test matching on annotations directly in the java.lang package
Diffstat (limited to 'weaver5/java5-testsrc')
-rw-r--r--weaver5/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/weaver5/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java b/weaver5/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java
index b8363d040..6127b2dd8 100644
--- a/weaver5/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java
+++ b/weaver5/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java
@@ -276,6 +276,13 @@ public class Java15PointcutExpressionTest extends TestCase {
assertFalse("should not match",sm2.alwaysMatches());
}
+ public void testJavaLangMatching() throws Exception {
+ PointcutExpression ex = parser.parsePointcutExpression("@within(java.lang.Deprecated)");
+ Method foo = GoldenOldie.class.getMethod("foo");
+ ShadowMatch sm1 = ex.matchesMethodExecution(foo);
+ assertTrue("should match",sm1.alwaysMatches());
+ }
+
protected void setUp() throws Exception {
super.setUp();
parser = PointcutParser.getPointcutParserSupportingAllPrimitivesAndUsingSpecifiedClassloaderForResolution(this.getClass().getClassLoader());
@@ -323,6 +330,10 @@ public class Java15PointcutExpressionTest extends TestCase {
public void setFriends(List<C> friends) {}
}
+ @Deprecated
+ static class GoldenOldie {
+ public void foo() {}
+ }
}