polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [02/15] polygene-java git commit: Deprecating the Visitor pattern. It is not in line with the Stream API that we use everywhere else.
Date Sat, 18 Feb 2017 00:43:28 GMT
Deprecating the Visitor pattern. It is not in line with the Stream API that we use everywhere
else.


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

Branch: refs/heads/develop
Commit: 4e619fbf1f3a6b0521855eaec0f7cbd8dcc2fe1a
Parents: a547927
Author: Niclas Hedhman <niclas@hedhman.org>
Authored: Sat Jan 7 14:59:44 2017 +0800
Committer: Niclas Hedhman <niclas@hedhman.org>
Committed: Sat Jan 7 14:59:44 2017 +0800

----------------------------------------------------------------------
 .../java/org/apache/polygene/bootstrap/LayerAssembly.java | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/4e619fbf/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/LayerAssembly.java
----------------------------------------------------------------------
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/LayerAssembly.java
b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/LayerAssembly.java
index 0385040..f5c3b09 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/LayerAssembly.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/LayerAssembly.java
@@ -91,6 +91,16 @@ public interface LayerAssembly
     @SuppressWarnings( { "unchecked","varargs" } )
     LayerAssembly withActivators( Class<? extends Activator<Layer>>... activators
);
 
+    /**
+     * The visitor pattern to inspect the entire pre-instantiated model.
+     *
+     * @deprecated New mechanism is considered, using Java 8 Stream API.
+     *
+     * @param visitor The visitor to be called.
+     * @param <ThrowableType> The exceptions that may be thrown.
+     * @throws ThrowableType when there is an underlying problem in the model.
+     */
+    @Deprecated
     <ThrowableType extends Throwable> void visit( AssemblyVisitor<ThrowableType>
visitor )
         throws ThrowableType;
 


Mime
View raw message