blob: 78b55d8cb48c3416e3bcc73805f4c38b1d259586 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html> <head>
<title>AspectJ 1.8.0 Readme</title>
<style type="text/css">
<!--
P { margin-left: 20px; }
PRE { margin-left: 20px; }
LI { margin-left: 20px; }
H4 { margin-left: 20px; }
H3 { margin-left: 10px; }
-->
</style>
</head>
<body>
<div align="right"><small>
© Copyright 2013 Contributors.
All rights reserved.
</small></div>
<h1>AspectJ 1.8.0 Readme</h1>
<p>The full list of resolved issues in 1.8.0 is available
<a href="https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.8.0;">here</a></h2>.</p>
<ul>
<li>1.8.0.RC1 available 18-Mar-2014
<li>1.8.0.M1 available 29-Jul-2013
</ul>
<h2>Notable changes</h2>
<h3>Java 8 compilation</h3>
<p>AspectJ has been updated to the latest available Eclipse Java
compiler version that compiles Java8 code.</p>
</p>
<p>Here is a sample AspectJ8 program:</p>
<pre><code>
=== 8< ==== C.java ==== 8< ===
import java.util.Arrays;
interface I {
// Default method
default void foo() {
System.out.println("ABC");
}
}
public class C implements I{
public static void main(String[] args) {
new C().foo();
// Lambda
Runnable r = () -> { System.out.println("hello world!"); };
r.run();
// Used Java8 b97
Arrays.asList(MyClass.doSomething()).forEach((p) -> System.out.println(p));
}
}
aspect X {
before(): execution(* I.foo()) {
System.out.println("I.foo running");
}
before(): staticinitialization(!X) {
System.out.println("Clazz "+thisJoinPointStaticPart);
}
}
class Utils {
public static int compareByLength(String in, String out) {
return in.length() - out.length();
}
}
class MyClass {
public static String[] doSomething() {
String []args = new String[]{"4444","333","22","1"};
// Method reference
Arrays.sort(args,Utils::compareByLength);
return args;
}
}
=== 8< ==== C.java ==== 8< ===
</code></pre>
<h4>
<h3>Other</h3>
<p>The fixes in the 1.7 branch which have occurred since this 1.8 branch was created
have been merged into the 1.8 release.</p>
<!-- ============================== -->
</body>
</html>
|