aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features197/java15/PersonAspect.aj
diff options
context:
space:
mode:
Diffstat (limited to 'tests/features197/java15/PersonAspect.aj')
-rw-r--r--tests/features197/java15/PersonAspect.aj17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/features197/java15/PersonAspect.aj b/tests/features197/java15/PersonAspect.aj
new file mode 100644
index 000000000..695a4de36
--- /dev/null
+++ b/tests/features197/java15/PersonAspect.aj
@@ -0,0 +1,17 @@
+public aspect PersonAspect {
+ // Weave into sealed class
+ void around(String name): execution(void sayHello(*)) && args(name) {
+ proceed("Sir " + name);
+ }
+
+ // ITD into non-sealed subclass of sealed class
+ private String Manager.jobTitle;
+
+ public void TopManager.setJobTitle(String jobTitle) {
+ this.jobTitle = jobTitle;
+ }
+
+ public String TopManager.getJobTitle() {
+ return jobTitle;
+ }
+}