From 4471ba76ac755b504d99e514a1cf5a375e7d02d1 Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Mon, 20 Apr 2020 16:24:02 -0700 Subject: Include JDTCore for Java14 --- docs/dist/doc/README-196.html | 74 +++++++++++++++++++++++++++++++++++++++++++ docs/dist/doc/index.html | 1 + 2 files changed, 75 insertions(+) create mode 100644 docs/dist/doc/README-196.html (limited to 'docs/dist') diff --git a/docs/dist/doc/README-196.html b/docs/dist/doc/README-196.html new file mode 100644 index 000000000..b9dbaea4a --- /dev/null +++ b/docs/dist/doc/README-196.html @@ -0,0 +1,74 @@ + + +AspectJ 1.9.6 Readme + + + + +
+© Copyright 2020 Contributors. +All rights reserved. +
+

AspectJ 1.9.6

+

The full list of resolved issues in 1.9.6 is available +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
+This
+is
+on
+multiple
+lines
+
+ +

Available: 1.9.6 available 22-Apr-2020

+ +

+ + + + + diff --git a/docs/dist/doc/index.html b/docs/dist/doc/index.html index fe276ee4a..f8309f335 100644 --- a/docs/dist/doc/index.html +++ b/docs/dist/doc/index.html @@ -138,6 +138,7 @@ README's Changes and porting guide for AspectJ + 1.9.6, 1.9.5, 1.9.4, 1.9.3, -- cgit v1.2.3