polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [01/13] polygene-java git commit: Assembler is a FunctionalInterface and can be used as a lambda
Date Fri, 26 May 2017 15:00:16 GMT
Repository: polygene-java
Updated Branches:
  refs/heads/develop c7f705bd2 -> c8d8f75bc


Assembler is a FunctionalInterface and can be used as a lambda

Since AssemblyException is unchecked


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/3fe11083
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/3fe11083
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/3fe11083

Branch: refs/heads/develop
Commit: 3fe11083b0244b855a3b151630ad6cd6eb40fe1d
Parents: c7f705b
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Mon May 22 19:48:44 2017 +0200
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Mon May 22 19:48:44 2017 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/polygene/bootstrap/Assembler.java    | 1 +
 .../org/apache/polygene/bootstrap/SingletonAssembler.java     | 7 +++----
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3fe11083/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/Assembler.java
----------------------------------------------------------------------
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/Assembler.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/Assembler.java
index 901f8d9..9e0ecd3 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/Assembler.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/Assembler.java
@@ -26,6 +26,7 @@ package org.apache.polygene.bootstrap;
  * all configuration and additional metainfo that is needed
  * to instantiate a Polygene application.
  */
+@FunctionalInterface
 public interface Assembler
 {
     /**

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3fe11083/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/SingletonAssembler.java
----------------------------------------------------------------------
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/SingletonAssembler.java
b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/SingletonAssembler.java
index 01673f8..d433641 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/SingletonAssembler.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/SingletonAssembler.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.bootstrap;
 
-import java.util.function.Consumer;
 import org.apache.polygene.api.PolygeneAPI;
 import org.apache.polygene.api.activation.ActivationException;
 import org.apache.polygene.api.composite.TransientBuilderFactory;
@@ -45,7 +44,7 @@ public class SingletonAssembler
     private final Energy4Java polygene;
     private final Application applicationInstance;
     private final Module moduleInstance;
-    private Consumer<ModuleAssembly> assemble;
+    private Assembler assemble;
 
     /**
      * Creates a Polygene Runtime instance containing one Layer with one Module.
@@ -58,7 +57,7 @@ public class SingletonAssembler
      *                             the programming model makes it impossible to create it.
      * @throws ActivationException If the automatic {@code activate()} method is throwing
this Exception..
      */
-    public SingletonAssembler( Consumer<ModuleAssembly> assemble )
+    public SingletonAssembler( Assembler assemble )
         throws ActivationException
     {
         this.assemble = assemble;
@@ -177,7 +176,7 @@ public class SingletonAssembler
     {
         if( assemble != null )
         {
-            assemble.accept( module );
+            assemble.assemble( module );
         }
     }
 }


Mime
View raw message