aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/WildNames.java
diff options
context:
space:
mode:
authorwisberg <wisberg>2002-12-16 18:51:06 +0000
committerwisberg <wisberg>2002-12-16 18:51:06 +0000
commit144143c2970a1e874d74cdbd0f8c622d4282a3c3 (patch)
treeb12383d3d9e76c7e1f25f7fbec83051ef17f81fb /tests/new/WildNames.java
parentfafae443719b26159ab2d7dac1c9b46b5e00b671 (diff)
downloadaspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.tar.gz
aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.zip
initial version
Diffstat (limited to 'tests/new/WildNames.java')
-rw-r--r--tests/new/WildNames.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/new/WildNames.java b/tests/new/WildNames.java
new file mode 100644
index 000000000..63260a7cd
--- /dev/null
+++ b/tests/new/WildNames.java
@@ -0,0 +1,42 @@
+import org.aspectj.testing.Tester;
+
+public aspect WildNames {
+ public static void main(String[] args) { test(); }
+
+ public static void test() {
+ C c = new C();
+
+ c.getFoo(); c.getBar();
+ Tester.check("getFoo"); Tester.check("getBar");
+
+ c.fooGetter(); c.barGetter();
+ Tester.check("fooGetter"); Tester.check("barGetter");
+
+ c.prefixFooSuffix(); c.prefixBarSuffix();
+ Tester.check("prefixFooSuffix"); Tester.check("prefixBarSuffix");
+ }
+
+ /*static*/ after() returning (String s): execution(String get*()) {
+ Tester.checkEqual("get*", s);
+ Tester.note(thisJoinPoint.getSignature().getName());
+ }
+ /*static*/ after() returning (String s): execution(String *Getter()) {
+ Tester.checkEqual("*Getter", s);
+ Tester.note(thisJoinPoint.getSignature().getName());
+ }
+ /*static*/ after() returning (String s): execution(String prefix*Suffix()) {
+ Tester.checkEqual("prefix*Suffix", s);
+ Tester.note(thisJoinPoint.getSignature().getName());
+ }
+}
+
+class C {
+ public String getFoo() { return "get*"; }
+ public String getBar() { return "get*"; }
+
+ public String fooGetter() { return "*Getter"; }
+ public String barGetter() { return "*Getter"; }
+
+ public String prefixFooSuffix() { return "prefix*Suffix"; }
+ public String prefixBarSuffix() { return "prefix*Suffix"; }
+}