From be6afe6d1d0cdfa2573c95bd7b5af58832c29b7c Mon Sep 17 00:00:00 2001 From: Arik Hadas Date: Thu, 5 Mar 2015 12:57:21 +0200 Subject: [PATCH] hello-world for cjp --- closures_demos/build.xml | 10 ++++++++++ closures_demos/helloworld/src/HelloWorld.java | 15 +++++++++++++++ closures_demos/helloworld/src/Impact.aj | 16 ++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 closures_demos/helloworld/src/HelloWorld.java create mode 100644 closures_demos/helloworld/src/Impact.aj diff --git a/closures_demos/build.xml b/closures_demos/build.xml index a1ae492..11f8d55 100755 --- a/closures_demos/build.xml +++ b/closures_demos/build.xml @@ -19,4 +19,14 @@ + + + + + + + + + + diff --git a/closures_demos/helloworld/src/HelloWorld.java b/closures_demos/helloworld/src/HelloWorld.java new file mode 100644 index 0000000..eae814e --- /dev/null +++ b/closures_demos/helloworld/src/HelloWorld.java @@ -0,0 +1,15 @@ +package test; + +public class HelloWorld { + public static void main(String[] args) { + exhibit say(String message) { + System.out.println("Hello, " + message); + }("World"); + } +} + + + + + + diff --git a/closures_demos/helloworld/src/Impact.aj b/closures_demos/helloworld/src/Impact.aj new file mode 100644 index 0000000..b24e964 --- /dev/null +++ b/closures_demos/helloworld/src/Impact.aj @@ -0,0 +1,16 @@ +package test; + +aspect Impact { + joinpoint void say(String message); + + after say(String message) { + System.out.println( + "It did a " + message + " of good."); + } +} + + + + + +