diff options
Diffstat (limited to 'docs/dist/doc/README-196.adoc')
-rw-r--r-- | docs/dist/doc/README-196.adoc | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/docs/dist/doc/README-196.adoc b/docs/dist/doc/README-196.adoc new file mode 100644 index 000000000..536cd4ec9 --- /dev/null +++ b/docs/dist/doc/README-196.adoc @@ -0,0 +1,57 @@ +[.small]#© Copyright 2020 Contributors. All rights reserved.# + +== AspectJ 1.9.6 + +The full list of resolved issues in 1.9.6 is available +https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&f0=OP&f1=OP&f3=CP&f4=CP&j1=OR&list_id=16866879&product=AspectJ&query_format=advanced&target_milestone=1.9.6[here] + +. + +AspectJ 1.9.6 supports Java14. Java14 introduces records, but you must +activate support for that via an --enable-preview flag when using the +compiler and attempting to run the resultant classes: Here is Code.java: + +.... +=======8<========= +public record Person(String firstName, String lastName, int age) {} +=======8<========= + +=======8<========= +public class UsingPersonRecord { + public static void main(String[] argv) { + Person p = new Person("A","B",99); + System.out.println(p); + System.out.println(p.firstName()); + } +} +=======8<========= + +=======8<========= +public aspect TraceRecordComponents { + before(): execution(public * *()) { + System.out.println(thisJoinPointStaticPart); + } +} +=======8<========= +.... + +Compile it with: + +.... +$ ajc --enable-preview -14 Person.java UsingPersonRecord.java TraceRecordComponents.java +.... + +Now run it: + +.... +$ java --enable-preview UsingPersonRecord +execution(String Person.toString()) +Person[firstName=A, lastName=B, age=99] +execution(String Person.firstName()) +A +.... + +Available: 1.9.6 available 22-Jul-2020 + + + + + |