From: Anthony Bargnesi Date: Thu, 22 Sep 2016 17:41:11 +0000 (-0400) Subject: added example project X-Git-Tag: javainspect-1.7~31^2~1 X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=8eb86b4bb71cc64ffaffdb2f975aa0dd5b4f429c;p=javainspect.git added example project --- diff --git a/.gitignore b/.gitignore index 000f0ea..a47ec35 100755 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /target/ /.idea/ dependency-reduced-pom.xml +/example/target diff --git a/example/pom.xml b/example/pom.xml new file mode 100644 index 0000000..e3d0312 --- /dev/null +++ b/example/pom.xml @@ -0,0 +1,24 @@ + + 4.0.0 + com.myproject + myproject + 0.0 + jar + MyProject + MyProject + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.8 + 1.8 + UTF-8 + + + + + diff --git a/example/src/main/java/com/myproject/Behavior.java b/example/src/main/java/com/myproject/Behavior.java new file mode 100644 index 0000000..d35ce27 --- /dev/null +++ b/example/src/main/java/com/myproject/Behavior.java @@ -0,0 +1,10 @@ +package com.myproject; + +public interface Behavior { + + String translate(Object obj); + + default String serialize(Object obj) { + return obj.toString(); + } +} diff --git a/example/src/main/java/com/myproject/NumberTranslator.java b/example/src/main/java/com/myproject/NumberTranslator.java new file mode 100644 index 0000000..b0cb6c4 --- /dev/null +++ b/example/src/main/java/com/myproject/NumberTranslator.java @@ -0,0 +1,8 @@ +package com.myproject; + +public class NumberTranslator implements Behavior { + + public String translate(Object obj) { + return serialize(obj); + } +}