You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polygene.apache.org by pa...@apache.org on 2016/12/09 16:28:38 UTC
[7/7] zest-java git commit: Remove core/functional
Remove core/functional
Moved Visitor to api.util
Project: http://git-wip-us.apache.org/repos/asf/zest-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-java/commit/0b4cca06
Tree: http://git-wip-us.apache.org/repos/asf/zest-java/tree/0b4cca06
Diff: http://git-wip-us.apache.org/repos/asf/zest-java/diff/0b4cca06
Branch: refs/heads/develop
Commit: 0b4cca0680e29990bb45e4795f56535dee6924e2
Parents: 37ce367
Author: Paul Merlin <pa...@apache.org>
Authored: Fri Dec 9 10:12:29 2016 +0100
Committer: Paul Merlin <pa...@apache.org>
Committed: Fri Dec 9 10:12:29 2016 +0100
----------------------------------------------------------------------
.../apache/zest/gradle/RootProjectPlugin.groovy | 3 +-
.../org/apache/zest/gradle/ZestExtension.groovy | 1 -
core/api/build.gradle | 2 -
.../api/structure/ApplicationDescriptor.java | 2 +-
.../zest/api/util/HierarchicalVisitor.java | 57 ++++++++++++++
.../api/util/HierarchicalVisitorAdapter.java | 48 ++++++++++++
.../org/apache/zest/api/util/Visitable.java | 29 +++++++
.../zest/api/util/VisitableHierarchy.java | 29 +++++++
.../java/org/apache/zest/api/util/Visitor.java | 39 ++++++++++
core/functional/build.gradle | 25 ------
core/functional/dev-status.xml | 36 ---------
core/functional/src/docs/functional.txt | 82 --------------------
.../src/docs/reference/ref-functional.txt | 18 -----
.../zest/functional/HierarchicalVisitor.java | 57 --------------
.../functional/HierarchicalVisitorAdapter.java | 48 ------------
.../org/apache/zest/functional/Visitable.java | 29 -------
.../zest/functional/VisitableHierarchy.java | 29 -------
.../org/apache/zest/functional/Visitor.java | 39 ----------
.../org/apache/zest/functional/package.html | 24 ------
.../IntegerRangeSpecificationTest.java | 64 ---------------
.../functional/docsupport/FunctionalDocs.java | 52 -------------
.../zest/runtime/activation/ActivatorModel.java | 4 +-
.../runtime/activation/ActivatorsModel.java | 6 +-
.../runtime/association/AssociationModel.java | 4 +-
.../runtime/association/AssociationsModel.java | 4 +-
.../association/ManyAssociationModel.java | 4 +-
.../association/ManyAssociationsModel.java | 4 +-
.../association/NamedAssociationModel.java | 4 +-
.../association/NamedAssociationsModel.java | 4 +-
.../bootstrap/ApplicationModelFactoryImpl.java | 2 +-
.../bootstrap/CompositeAssemblyImpl.java | 2 +-
.../composite/AbstractConstraintModel.java | 4 +-
.../composite/AbstractModifierModel.java | 4 +-
.../runtime/composite/CompositeMethodModel.java | 15 +---
.../composite/CompositeMethodsModel.java | 4 +-
.../zest/runtime/composite/CompositeModel.java | 4 +-
.../zest/runtime/composite/ConcernsModel.java | 4 +-
.../runtime/composite/ConstraintsModel.java | 4 +-
.../runtime/composite/ConstructorModel.java | 4 +-
.../runtime/composite/ConstructorsModel.java | 6 +-
.../zest/runtime/composite/MixinModel.java | 4 +-
.../zest/runtime/composite/MixinsModel.java | 11 ++-
.../runtime/composite/SideEffectsModel.java | 4 +-
.../zest/runtime/composite/StateModel.java | 4 +-
.../zest/runtime/composite/TransientsModel.java | 4 +-
.../composite/ValueConstraintsModel.java | 4 +-
.../zest/runtime/entity/EntitiesModel.java | 4 +-
.../zest/runtime/entity/EntityStateModel.java | 4 +-
.../zest/runtime/injection/DependencyModel.java | 4 +-
.../runtime/injection/InjectedFieldModel.java | 4 +-
.../runtime/injection/InjectedFieldsModel.java | 4 +-
.../runtime/injection/InjectedMethodModel.java | 4 +-
.../runtime/injection/InjectedMethodsModel.java | 4 +-
.../injection/InjectedParametersModel.java | 4 +-
.../apache/zest/runtime/object/ObjectModel.java | 4 +-
.../zest/runtime/object/ObjectsModel.java | 4 +-
.../zest/runtime/property/PropertiesModel.java | 4 +-
.../zest/runtime/property/PropertyModel.java | 4 +-
.../runtime/service/ImportedServiceModel.java | 4 +-
.../runtime/service/ImportedServicesModel.java | 4 +-
.../zest/runtime/service/ServiceModel.java | 2 +-
.../zest/runtime/service/ServicesModel.java | 4 +-
.../runtime/structure/ApplicationModel.java | 2 +-
.../zest/runtime/structure/LayerModel.java | 4 +-
.../zest/runtime/structure/ModuleModel.java | 4 +-
.../zest/runtime/structure/UsedLayersModel.java | 4 +-
.../zest/runtime/types/ValueTypeFactory.java | 2 +-
.../zest/runtime/value/ValueStateModel.java | 4 +-
.../apache/zest/runtime/value/ValuesModel.java | 4 +-
.../bootstrap/ApplicationAssemblerTest.java | 2 +-
.../apache/zest/regression/qi78/IssueTest.java | 2 +-
.../support/skeletons/AbstractSQLStartup.java | 2 +-
.../apache/zest/library/appbrowser/Browser.java | 2 +-
.../circuitbreaker/src/docs/circuitbreaker.txt | 2 +-
.../library/jmx/ApplicationManagerService.java | 2 +-
.../library/rdf/model/ApplicationVisitor.java | 2 +-
.../zest/library/rdf/model/Model2XML.java | 2 +-
.../internal/service/ServiceLocator.java | 2 +-
.../zest/library/sql/common/Databases.java | 2 +-
manual/src/docs/userguide/core.txt | 15 ----
settings.gradle | 3 +-
.../descriptor/ActivatorDetailDescriptor.java | 4 +-
.../descriptor/ApplicationDetailDescriptor.java | 4 +-
.../ApplicationDetailDescriptorBuilder.java | 2 +-
.../descriptor/EntityDetailDescriptor.java | 4 +-
.../ImportedServiceDetailDescriptor.java | 4 +-
.../model/descriptor/LayerDetailDescriptor.java | 4 +-
.../descriptor/ModuleDetailDescriptor.java | 4 +-
.../descriptor/ObjectDetailDescriptor.java | 4 +-
.../descriptor/ServiceDetailDescriptor.java | 4 +-
.../descriptor/TransientDetailDescriptor.java | 4 +-
.../model/descriptor/ValueDetailDescriptor.java | 4 +-
.../zest/tools/model/VisitableDetailTest.java | 4 +-
93 files changed, 337 insertions(+), 664 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/buildSrc/src/main/groovy/org/apache/zest/gradle/RootProjectPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/zest/gradle/RootProjectPlugin.groovy b/buildSrc/src/main/groovy/org/apache/zest/gradle/RootProjectPlugin.groovy
index afc690a..e669c99 100644
--- a/buildSrc/src/main/groovy/org/apache/zest/gradle/RootProjectPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/zest/gradle/RootProjectPlugin.groovy
@@ -162,8 +162,7 @@ class RootProjectPlugin implements Plugin<Project>
} )
options.group( [
"Core API" : [ "org.apache.zest.api",
- "org.apache.zest.api.*",
- "org.apache.zest.functional" ],
+ "org.apache.zest.api.*" ],
"Core Bootstrap": [ "org.apache.zest.bootstrap",
"org.apache.zest.bootstrap.*" ],
"Core SPI" : [ "org.apache.zest.spi",
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/buildSrc/src/main/groovy/org/apache/zest/gradle/ZestExtension.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/zest/gradle/ZestExtension.groovy b/buildSrc/src/main/groovy/org/apache/zest/gradle/ZestExtension.groovy
index f57d8b4..4d6184b 100644
--- a/buildSrc/src/main/groovy/org/apache/zest/gradle/ZestExtension.groovy
+++ b/buildSrc/src/main/groovy/org/apache/zest/gradle/ZestExtension.groovy
@@ -50,7 +50,6 @@ class ZestExtension
Dependency runtime = core( 'runtime' )
Dependency bootstrap = core( 'bootstrap' )
Dependency testsupport = core( 'testsupport' )
- Dependency functional = core( 'functional' )
}
private Dependency core( String name )
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/api/build.gradle
----------------------------------------------------------------------
diff --git a/core/api/build.gradle b/core/api/build.gradle
index ae8fc0c..c854d18 100644
--- a/core/api/build.gradle
+++ b/core/api/build.gradle
@@ -21,8 +21,6 @@
jar { manifest { name = "Apache Zest\u2122 Core API" } }
dependencies {
- compile zest.core.functional
-
testCompile zest.core.testsupport
testCompile zest.library( 'constraints' )
testCompile zest.extension( 'valueserialization-orgjson' )
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/api/src/main/java/org/apache/zest/api/structure/ApplicationDescriptor.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/structure/ApplicationDescriptor.java b/core/api/src/main/java/org/apache/zest/api/structure/ApplicationDescriptor.java
index 3b7b4a4..111c092 100644
--- a/core/api/src/main/java/org/apache/zest/api/structure/ApplicationDescriptor.java
+++ b/core/api/src/main/java/org/apache/zest/api/structure/ApplicationDescriptor.java
@@ -20,7 +20,7 @@
package org.apache.zest.api.structure;
import org.apache.zest.api.ZestAPI;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.VisitableHierarchy;
/**
* Application Descriptor.
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/api/src/main/java/org/apache/zest/api/util/HierarchicalVisitor.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/util/HierarchicalVisitor.java b/core/api/src/main/java/org/apache/zest/api/util/HierarchicalVisitor.java
new file mode 100644
index 0000000..8a1c53e
--- /dev/null
+++ b/core/api/src/main/java/org/apache/zest/api/util/HierarchicalVisitor.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ */
+
+package org.apache.zest.api.util;
+
+/**
+ * Visitor to visit hierarchies.
+ */
+public interface HierarchicalVisitor<NODE, LEAF, ThrowableType extends Throwable> extends Visitor<LEAF, ThrowableType>
+{
+ /**
+ * Enter an instance of T
+ *
+ * @param visited the visited instance which is now entered
+ *
+ * @return true if the visitor pattern should continue, false if it should be aborted for this level
+ *
+ * @throws ThrowableType if an exception occurred during processing. Any client call that initiated the visiting should
+ * get the exception in order to handle it properly.
+ */
+ boolean visitEnter( NODE visited )
+ throws ThrowableType;
+
+ /**
+ * Leave an instance of T
+ *
+ * @param visited the visited instance which is now left
+ *
+ * @return true if the visitor pattern should continue, false if it should be aborted for the level of this node
+ *
+ * @throws ThrowableType if an exception occurred during processing. Any client call that initiated the visiting should
+ * get the exception in order to handle it properly.
+ */
+ boolean visitLeave( NODE visited )
+ throws ThrowableType;
+
+ @Override
+ boolean visit( LEAF visited )
+ throws ThrowableType;
+}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/api/src/main/java/org/apache/zest/api/util/HierarchicalVisitorAdapter.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/util/HierarchicalVisitorAdapter.java b/core/api/src/main/java/org/apache/zest/api/util/HierarchicalVisitorAdapter.java
new file mode 100644
index 0000000..1a2357b
--- /dev/null
+++ b/core/api/src/main/java/org/apache/zest/api/util/HierarchicalVisitorAdapter.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ */
+package org.apache.zest.api.util;
+
+/**
+ * Generic Hierarchical Visitor interface.
+ */
+public class HierarchicalVisitorAdapter<NODE, LEAF, ThrowableType extends Throwable>
+ implements HierarchicalVisitor<NODE, LEAF, ThrowableType>
+{
+ @Override
+ public boolean visitEnter( NODE visited )
+ throws ThrowableType
+ {
+ return true;
+ }
+
+ @Override
+ public boolean visitLeave( NODE visited )
+ throws ThrowableType
+ {
+ return true;
+ }
+
+ @Override
+ public boolean visit( LEAF visited )
+ throws ThrowableType
+ {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/api/src/main/java/org/apache/zest/api/util/Visitable.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/util/Visitable.java b/core/api/src/main/java/org/apache/zest/api/util/Visitable.java
new file mode 100644
index 0000000..49cceec
--- /dev/null
+++ b/core/api/src/main/java/org/apache/zest/api/util/Visitable.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ */
+package org.apache.zest.api.util;
+
+/**
+ * Interface that visitable objects should implement.
+ */
+public interface Visitable<T>
+{
+ <ThrowableType extends Throwable> boolean accept( Visitor<? super T, ThrowableType> visitor )
+ throws ThrowableType;
+}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/api/src/main/java/org/apache/zest/api/util/VisitableHierarchy.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/util/VisitableHierarchy.java b/core/api/src/main/java/org/apache/zest/api/util/VisitableHierarchy.java
new file mode 100644
index 0000000..642c32e
--- /dev/null
+++ b/core/api/src/main/java/org/apache/zest/api/util/VisitableHierarchy.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ */
+package org.apache.zest.api.util;
+
+/**
+ * Interface that visitable hierarchies of objects should implement.
+ */
+public interface VisitableHierarchy<NODE, LEAF>
+{
+ <ThrowableType extends Throwable> boolean accept( HierarchicalVisitor<? super NODE, ? super LEAF, ThrowableType> visitor )
+ throws ThrowableType;
+}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/api/src/main/java/org/apache/zest/api/util/Visitor.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/util/Visitor.java b/core/api/src/main/java/org/apache/zest/api/util/Visitor.java
new file mode 100644
index 0000000..dff2309
--- /dev/null
+++ b/core/api/src/main/java/org/apache/zest/api/util/Visitor.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ */
+package org.apache.zest.api.util;
+
+/**
+ * Generic Visitor interface.
+ */
+public interface Visitor<T, ThrowableType extends Throwable>
+{
+ /**
+ * Visit an instance of T
+ *
+ * @param visited the visited instance
+ *
+ * @return true if the visitor pattern should continue, false if it should be aborted
+ *
+ * @throws ThrowableType if an exception occurred during processing. Any client call that initiated the visiting should
+ * get the exception in order to handle it properly.
+ */
+ boolean visit( T visited )
+ throws ThrowableType;
+}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/functional/build.gradle
----------------------------------------------------------------------
diff --git a/core/functional/build.gradle b/core/functional/build.gradle
deleted file mode 100644
index 91d7170..0000000
--- a/core/functional/build.gradle
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- */
-
-jar { manifest { name = "Apache Zest\u2122 Functional"}}
-
-dependencies {
-
-}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/functional/dev-status.xml
----------------------------------------------------------------------
diff --git a/core/functional/dev-status.xml b/core/functional/dev-status.xml
deleted file mode 100644
index 412d5e3..0000000
--- a/core/functional/dev-status.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- ~
- ~
- -->
-<module xmlns="http://zest.apache.org/schemas/2008/dev-status/1"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://zest.apache.org/schemas/2008/dev-status/1
- http://zest.apache.org/schemas/2008/dev-status/1/dev-status.xsd">
- <status>
- <codebase>beta</codebase>
- <!--none,early,beta,stable,mature-->
- <documentation>good</documentation>
- <!-- none, brief, good, complete -->
- <unittests>good</unittests>
- <!-- none, some, good, complete -->
- </status>
- <licenses>
- <license>ALv2</license>
- </licenses>
-</module>
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/functional/src/docs/functional.txt
----------------------------------------------------------------------
diff --git a/core/functional/src/docs/functional.txt b/core/functional/src/docs/functional.txt
deleted file mode 100644
index eb6dbb6..0000000
--- a/core/functional/src/docs/functional.txt
+++ /dev/null
@@ -1,82 +0,0 @@
-//////////////////////
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-//////////////////////
-
-[[core-functional,Function]]
-= Core Functional API =
-
-[devstatus]
---------------
-source=core/functional/dev-status.xml
---------------
-
-The Zest\u2122 Core Functional API is a generic package to work with Iterables in a "functional programming language" style.
-
-This package is completely independent of everything else in Zest\u2122 and may be used on its own in any kind of environment
-such as Spring or Java EE applications.
-
-include::../../build/docs/buildinfo/artifact.txt[]
-
-== First Example ==
-Let's say that you have an Iterable of Integers and you want to sum them all up. Most people would create a loop and
-sum it all up in something like this;
-
-[snippet,java]
------------
-source=core/functional/src/test/java/org/apache/zest/functional/docsupport/FunctionalDocs.java
-tag=func1
------------
-
-With the Zest\u2122 Core Functional API, you go about it in a different way. The code ends up looking like this;
-
-[snippet,java]
------------
-source=core/functional/src/test/java/org/apache/zest/functional/docsupport/FunctionalDocs.java
-tag=func2
------------
-
-And this is just the tip of the iceberg.
-
-== The Big Picture ==
-
-The Zest\u2122 Core Functional API are divided a handful of powerful concepts, especially when used together;
-
- * *Iterables* - many methods to deal with Iterable data, so that the loops in your programs can largely be removed.
-
- * *Functions* - f(x) and f(x,y) are well-know from mathematics and used in functional programming languages. Zest\u2122 is
- not capable of introducing lambda calculus due to limitations in Java itself, but we can simulate a lot to allow
- people to create more readable code.
-
- * *Specification* - A simple concept to define the bounds of data. This is used for filtering, query and many other
- higher level abstractions.
-
- * *Visitor* pattern - A way to be handed the items in a collection, without having the loops. This could be for
- end result handling, distribution of intermediary values, and many other things.
-
-
-== Specification ==
-TODO
-
-== Function ==
-TODO
-
-== Visitor Pattern ==
-TODO
-
-== Iterables ==
-TODO
-
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/functional/src/docs/reference/ref-functional.txt
----------------------------------------------------------------------
diff --git a/core/functional/src/docs/reference/ref-functional.txt b/core/functional/src/docs/reference/ref-functional.txt
deleted file mode 100644
index fc7aac6..0000000
--- a/core/functional/src/docs/reference/ref-functional.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-///////////////////////////////////////////////////////////////
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-///////////////////////////////////////////////////////////////
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/functional/src/main/java/org/apache/zest/functional/HierarchicalVisitor.java
----------------------------------------------------------------------
diff --git a/core/functional/src/main/java/org/apache/zest/functional/HierarchicalVisitor.java b/core/functional/src/main/java/org/apache/zest/functional/HierarchicalVisitor.java
deleted file mode 100644
index 167f3fb..0000000
--- a/core/functional/src/main/java/org/apache/zest/functional/HierarchicalVisitor.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- */
-
-package org.apache.zest.functional;
-
-/**
- * Visitor to visit hierarchies.
- */
-public interface HierarchicalVisitor<NODE, LEAF, ThrowableType extends Throwable> extends Visitor<LEAF, ThrowableType>
-{
- /**
- * Enter an instance of T
- *
- * @param visited the visited instance which is now entered
- *
- * @return true if the visitor pattern should continue, false if it should be aborted for this level
- *
- * @throws ThrowableType if an exception occurred during processing. Any client call that initiated the visiting should
- * get the exception in order to handle it properly.
- */
- boolean visitEnter( NODE visited )
- throws ThrowableType;
-
- /**
- * Leave an instance of T
- *
- * @param visited the visited instance which is now left
- *
- * @return true if the visitor pattern should continue, false if it should be aborted for the level of this node
- *
- * @throws ThrowableType if an exception occurred during processing. Any client call that initiated the visiting should
- * get the exception in order to handle it properly.
- */
- boolean visitLeave( NODE visited )
- throws ThrowableType;
-
- @Override
- boolean visit( LEAF visited )
- throws ThrowableType;
-}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/functional/src/main/java/org/apache/zest/functional/HierarchicalVisitorAdapter.java
----------------------------------------------------------------------
diff --git a/core/functional/src/main/java/org/apache/zest/functional/HierarchicalVisitorAdapter.java b/core/functional/src/main/java/org/apache/zest/functional/HierarchicalVisitorAdapter.java
deleted file mode 100644
index 121d9aa..0000000
--- a/core/functional/src/main/java/org/apache/zest/functional/HierarchicalVisitorAdapter.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- */
-package org.apache.zest.functional;
-
-/**
- * Generic Hierarchical Visitor interface.
- */
-public class HierarchicalVisitorAdapter<NODE, LEAF, ThrowableType extends Throwable>
- implements HierarchicalVisitor<NODE, LEAF, ThrowableType>
-{
- @Override
- public boolean visitEnter( NODE visited )
- throws ThrowableType
- {
- return true;
- }
-
- @Override
- public boolean visitLeave( NODE visited )
- throws ThrowableType
- {
- return true;
- }
-
- @Override
- public boolean visit( LEAF visited )
- throws ThrowableType
- {
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/functional/src/main/java/org/apache/zest/functional/Visitable.java
----------------------------------------------------------------------
diff --git a/core/functional/src/main/java/org/apache/zest/functional/Visitable.java b/core/functional/src/main/java/org/apache/zest/functional/Visitable.java
deleted file mode 100644
index 50f8b21..0000000
--- a/core/functional/src/main/java/org/apache/zest/functional/Visitable.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- */
-package org.apache.zest.functional;
-
-/**
- * Interface that visitable objects should implement.
- */
-public interface Visitable<T>
-{
- <ThrowableType extends Throwable> boolean accept( Visitor<? super T, ThrowableType> visitor )
- throws ThrowableType;
-}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/functional/src/main/java/org/apache/zest/functional/VisitableHierarchy.java
----------------------------------------------------------------------
diff --git a/core/functional/src/main/java/org/apache/zest/functional/VisitableHierarchy.java b/core/functional/src/main/java/org/apache/zest/functional/VisitableHierarchy.java
deleted file mode 100644
index bb1b0ab..0000000
--- a/core/functional/src/main/java/org/apache/zest/functional/VisitableHierarchy.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- */
-package org.apache.zest.functional;
-
-/**
- * Interface that visitable hierarchies of objects should implement.
- */
-public interface VisitableHierarchy<NODE, LEAF>
-{
- <ThrowableType extends Throwable> boolean accept( HierarchicalVisitor<? super NODE, ? super LEAF, ThrowableType> visitor )
- throws ThrowableType;
-}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/functional/src/main/java/org/apache/zest/functional/Visitor.java
----------------------------------------------------------------------
diff --git a/core/functional/src/main/java/org/apache/zest/functional/Visitor.java b/core/functional/src/main/java/org/apache/zest/functional/Visitor.java
deleted file mode 100644
index bfe8097..0000000
--- a/core/functional/src/main/java/org/apache/zest/functional/Visitor.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- */
-package org.apache.zest.functional;
-
-/**
- * Generic Visitor interface.
- */
-public interface Visitor<T, ThrowableType extends Throwable>
-{
- /**
- * Visit an instance of T
- *
- * @param visited the visited instance
- *
- * @return true if the visitor pattern should continue, false if it should be aborted
- *
- * @throws ThrowableType if an exception occurred during processing. Any client call that initiated the visiting should
- * get the exception in order to handle it properly.
- */
- boolean visit( T visited )
- throws ThrowableType;
-}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/functional/src/main/java/org/apache/zest/functional/package.html
----------------------------------------------------------------------
diff --git a/core/functional/src/main/java/org/apache/zest/functional/package.html b/core/functional/src/main/java/org/apache/zest/functional/package.html
deleted file mode 100644
index c8535c4..0000000
--- a/core/functional/src/main/java/org/apache/zest/functional/package.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- ~
- ~
- -->
-<html>
- <body>
- <h2>Functional API.</h2>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/functional/src/test/java/org/apache/zest/functional/IntegerRangeSpecificationTest.java
----------------------------------------------------------------------
diff --git a/core/functional/src/test/java/org/apache/zest/functional/IntegerRangeSpecificationTest.java b/core/functional/src/test/java/org/apache/zest/functional/IntegerRangeSpecificationTest.java
deleted file mode 100644
index 0a19371..0000000
--- a/core/functional/src/test/java/org/apache/zest/functional/IntegerRangeSpecificationTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- */
-
-package org.apache.zest.functional;
-
-import java.util.function.Predicate;
-import org.junit.Test;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-// This test exist primarily for the documentation. Don't remove.
-public class IntegerRangeSpecificationTest
-{
- @Test
- public void test1()
- {
- Predicate<Integer> spec = new IntegerRangeSpecification( 10, 12 );
- assertTrue( spec.test( 10 ) );
- assertTrue( spec.test( 11 ) );
- assertTrue( spec.test( 12 ) );
- assertFalse( spec.test( 9 ) );
- assertFalse( spec.test( 13 ) );
- }
-
- // START SNIPPET: specification
- public static class IntegerRangeSpecification
- implements Predicate<Integer>
- {
-
- private int lower;
- private int higher;
-
- public IntegerRangeSpecification( int lower, int higher )
- {
- this.lower = lower;
- this.higher = higher;
- }
-
- @Override
- public boolean test( Integer item )
- {
- return item >= lower && item <= higher;
- }
- }
- // END SNIPPET: specification
-}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/functional/src/test/java/org/apache/zest/functional/docsupport/FunctionalDocs.java
----------------------------------------------------------------------
diff --git a/core/functional/src/test/java/org/apache/zest/functional/docsupport/FunctionalDocs.java b/core/functional/src/test/java/org/apache/zest/functional/docsupport/FunctionalDocs.java
deleted file mode 100644
index b99cf9b..0000000
--- a/core/functional/src/test/java/org/apache/zest/functional/docsupport/FunctionalDocs.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- */
-package org.apache.zest.functional.docsupport;
-
-import java.util.ArrayList;
-import java.util.stream.StreamSupport;
-
-public class FunctionalDocs
-{
- public static void main( String[] args )
- {
- {
-// START SNIPPET: func1
- Iterable<Long> data = new ArrayList<Long>();
-// END SNIPPET: func1
-// START SNIPPET: func1
-
- long sum = 0;
- for( Long point : data )
- {
- sum = sum + point;
- }
- System.out.println( "The sum is " + sum );
-// END SNIPPET: func1
- }
- {
-// START SNIPPET: func2
- Iterable<Long> data = new ArrayList<>();
- Long total = StreamSupport.stream( data.spliterator(), true ).reduce( 0L, ( sum, n ) -> sum + n );
- System.out.println( "The sum is " + total );
-
-// END SNIPPET: func2
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/activation/ActivatorModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/activation/ActivatorModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/activation/ActivatorModel.java
index c1f52bf..fa7a3c5 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/activation/ActivatorModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/activation/ActivatorModel.java
@@ -22,8 +22,8 @@ package org.apache.zest.runtime.activation;
import org.apache.zest.api.activation.Activator;
import org.apache.zest.api.activation.ActivatorDescriptor;
import org.apache.zest.api.common.ConstructionException;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.runtime.composite.ConstructorsModel;
import org.apache.zest.runtime.injection.InjectedFieldsModel;
import org.apache.zest.runtime.injection.InjectedMethodsModel;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/activation/ActivatorsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/activation/ActivatorsModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/activation/ActivatorsModel.java
index 3622cac..6aa25c7 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/activation/ActivatorsModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/activation/ActivatorsModel.java
@@ -23,13 +23,11 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.zest.api.activation.ActivationException;
import org.apache.zest.api.activation.Activator;
-import org.apache.zest.api.structure.Module;
import org.apache.zest.api.structure.ModuleDescriptor;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.runtime.composite.UsesInstance;
import org.apache.zest.runtime.injection.InjectionContext;
-import org.apache.zest.runtime.structure.ModuleInstance;
/**
* Activators Model.
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/association/AssociationModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/association/AssociationModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/association/AssociationModel.java
index d8ca0c9..ee3092c 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/association/AssociationModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/association/AssociationModel.java
@@ -36,9 +36,9 @@ import org.apache.zest.api.entity.Aggregated;
import org.apache.zest.api.entity.Queryable;
import org.apache.zest.api.property.Immutable;
import org.apache.zest.api.util.Classes;
+import org.apache.zest.api.util.Visitable;
+import org.apache.zest.api.util.Visitor;
import org.apache.zest.bootstrap.BindingException;
-import org.apache.zest.functional.Visitable;
-import org.apache.zest.functional.Visitor;
import org.apache.zest.runtime.composite.ValueConstraintsInstance;
import org.apache.zest.runtime.model.Binder;
import org.apache.zest.runtime.model.Resolution;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/association/AssociationsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/association/AssociationsModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/association/AssociationsModel.java
index f4714a3..8f5aa46 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/association/AssociationsModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/association/AssociationsModel.java
@@ -28,8 +28,8 @@ import org.apache.zest.api.association.Association;
import org.apache.zest.api.association.AssociationDescriptor;
import org.apache.zest.api.association.AssociationStateHolder;
import org.apache.zest.api.common.QualifiedName;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
/**
* Model for Associations.
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/association/ManyAssociationModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/association/ManyAssociationModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/association/ManyAssociationModel.java
index e2974a4..1db4d4f 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/association/ManyAssociationModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/association/ManyAssociationModel.java
@@ -40,9 +40,9 @@ import org.apache.zest.api.entity.EntityReference;
import org.apache.zest.api.entity.Queryable;
import org.apache.zest.api.property.Immutable;
import org.apache.zest.api.util.Classes;
+import org.apache.zest.api.util.Visitable;
+import org.apache.zest.api.util.Visitor;
import org.apache.zest.bootstrap.BindingException;
-import org.apache.zest.functional.Visitable;
-import org.apache.zest.functional.Visitor;
import org.apache.zest.runtime.composite.ValueConstraintsInstance;
import org.apache.zest.runtime.model.Binder;
import org.apache.zest.runtime.model.Resolution;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/association/ManyAssociationsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/association/ManyAssociationsModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/association/ManyAssociationsModel.java
index 7f02ce4..cde6d79 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/association/ManyAssociationsModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/association/ManyAssociationsModel.java
@@ -27,8 +27,8 @@ import java.util.stream.Stream;
import org.apache.zest.api.association.AssociationDescriptor;
import org.apache.zest.api.association.ManyAssociation;
import org.apache.zest.api.common.QualifiedName;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.runtime.unitofwork.ModuleUnitOfWork;
import org.apache.zest.runtime.value.ValueStateInstance;
import org.apache.zest.spi.entity.EntityState;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/association/NamedAssociationModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/association/NamedAssociationModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/association/NamedAssociationModel.java
index 71b6bbd..29e1165 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/association/NamedAssociationModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/association/NamedAssociationModel.java
@@ -40,9 +40,9 @@ import org.apache.zest.api.entity.EntityReference;
import org.apache.zest.api.entity.Queryable;
import org.apache.zest.api.property.Immutable;
import org.apache.zest.api.util.Classes;
+import org.apache.zest.api.util.Visitable;
+import org.apache.zest.api.util.Visitor;
import org.apache.zest.bootstrap.BindingException;
-import org.apache.zest.functional.Visitable;
-import org.apache.zest.functional.Visitor;
import org.apache.zest.runtime.composite.ValueConstraintsInstance;
import org.apache.zest.runtime.model.Binder;
import org.apache.zest.runtime.model.Resolution;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/association/NamedAssociationsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/association/NamedAssociationsModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/association/NamedAssociationsModel.java
index ec1888b..5cf8ab3 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/association/NamedAssociationsModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/association/NamedAssociationsModel.java
@@ -27,8 +27,8 @@ import java.util.stream.Stream;
import org.apache.zest.api.association.AssociationDescriptor;
import org.apache.zest.api.association.NamedAssociation;
import org.apache.zest.api.common.QualifiedName;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.runtime.unitofwork.ModuleUnitOfWork;
import org.apache.zest.runtime.value.ValueStateInstance;
import org.apache.zest.spi.entity.EntityState;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/ApplicationModelFactoryImpl.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/ApplicationModelFactoryImpl.java b/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/ApplicationModelFactoryImpl.java
index ff7bf84..ed22f92 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/ApplicationModelFactoryImpl.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/ApplicationModelFactoryImpl.java
@@ -29,12 +29,12 @@ import org.apache.zest.api.composite.ModelDescriptor;
import org.apache.zest.api.structure.Application;
import org.apache.zest.api.structure.ApplicationDescriptor;
import org.apache.zest.api.structure.Layer;
+import org.apache.zest.api.util.HierarchicalVisitor;
import org.apache.zest.bootstrap.ApplicationAssembly;
import org.apache.zest.bootstrap.ApplicationModelFactory;
import org.apache.zest.bootstrap.AssemblyException;
import org.apache.zest.bootstrap.BindingException;
import org.apache.zest.bootstrap.LayerAssembly;
-import org.apache.zest.functional.HierarchicalVisitor;
import org.apache.zest.runtime.activation.ActivatorsModel;
import org.apache.zest.runtime.composite.CompositeMethodModel;
import org.apache.zest.runtime.injection.InjectedFieldModel;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/CompositeAssemblyImpl.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/CompositeAssemblyImpl.java b/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/CompositeAssemblyImpl.java
index b0731c3..82632a9 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/CompositeAssemblyImpl.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/CompositeAssemblyImpl.java
@@ -67,8 +67,8 @@ import org.apache.zest.api.type.HasTypes;
import org.apache.zest.api.util.Annotations;
import org.apache.zest.api.util.Classes;
import org.apache.zest.api.util.Fields;
+import org.apache.zest.api.util.HierarchicalVisitorAdapter;
import org.apache.zest.bootstrap.StateDeclarations;
-import org.apache.zest.functional.HierarchicalVisitorAdapter;
import org.apache.zest.runtime.association.AssociationModel;
import org.apache.zest.runtime.association.AssociationsModel;
import org.apache.zest.runtime.association.ManyAssociationModel;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/composite/AbstractConstraintModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/AbstractConstraintModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/composite/AbstractConstraintModel.java
index 9667e75..f8f8aa1 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/AbstractConstraintModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/AbstractConstraintModel.java
@@ -22,8 +22,8 @@ package org.apache.zest.runtime.composite;
import java.lang.annotation.Annotation;
import org.apache.zest.api.constraint.ConstraintDescriptor;
-import org.apache.zest.functional.Visitable;
-import org.apache.zest.functional.Visitor;
+import org.apache.zest.api.util.Visitable;
+import org.apache.zest.api.util.Visitor;
/**
* JAVADOC
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/composite/AbstractModifierModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/AbstractModifierModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/composite/AbstractModifierModel.java
index 0d7f8b5..6a8186e 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/AbstractModifierModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/AbstractModifierModel.java
@@ -27,8 +27,8 @@ import java.lang.reflect.Proxy;
import java.util.stream.Stream;
import org.apache.zest.api.common.ConstructionException;
import org.apache.zest.api.structure.ModuleDescriptor;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.runtime.injection.Dependencies;
import org.apache.zest.runtime.injection.DependencyModel;
import org.apache.zest.runtime.injection.InjectedFieldsModel;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompositeMethodModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompositeMethodModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompositeMethodModel.java
index be8a07c..9da3388 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompositeMethodModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompositeMethodModel.java
@@ -28,17 +28,17 @@ import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import java.util.Objects;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.zest.api.common.ConstructionException;
import org.apache.zest.api.composite.MethodDescriptor;
import org.apache.zest.api.structure.ModuleDescriptor;
+import org.apache.zest.api.util.HierarchicalVisitor;
import org.apache.zest.api.util.NullArgumentException;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.runtime.injection.Dependencies;
import org.apache.zest.runtime.injection.DependencyModel;
-import org.apache.zest.spi.module.ModuleSpi;
/**
* JAVADOC
@@ -100,14 +100,7 @@ public final class CompositeMethodModel
@SuppressWarnings( "unchecked" )
public Stream<DependencyModel> dependencies()
{
- // For some unknown reason, the following lines can not be put into a single expression.
- // This is possibly due to a compiler or JVM bug. The problem manifests itself in
- // failure inside the AssociationToValueTest and possibly others.
- // java.lang.invoke.LambdaConversionException: Invalid receiver type interface org.apache.zest.functional.VisitableHierarchy; not a subtype of implementation type interface org.apache.zest.runtime.injection.Dependencies
- // Since it is a runtime bug, we should not change this in Java 8, but if the problem is gone in Java 9,
- // we can collapse these into a single expression.
- Stream<? extends Dependencies> deps = Stream.of( this.concerns, sideEffects );
- return deps.filter( e -> e != null ).flatMap( Dependencies::dependencies );
+ return Stream.of( this.concerns, sideEffects ).filter( Objects::nonNull ).flatMap( Dependencies::dependencies );
}
// Context
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompositeMethodsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompositeMethodsModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompositeMethodsModel.java
index 4d7b795..6314d22 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompositeMethodsModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompositeMethodsModel.java
@@ -26,8 +26,8 @@ import java.util.LinkedHashMap;
import java.util.stream.Stream;
import org.apache.zest.api.composite.MissingMethodException;
import org.apache.zest.api.structure.ModuleDescriptor;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.runtime.injection.Dependencies;
import org.apache.zest.runtime.injection.DependencyModel;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompositeModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompositeModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompositeModel.java
index eb9ddb7..e6acf6a 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompositeModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompositeModel.java
@@ -34,8 +34,8 @@ import org.apache.zest.api.composite.Composite;
import org.apache.zest.api.composite.CompositeDescriptor;
import org.apache.zest.api.composite.InvalidCompositeException;
import org.apache.zest.api.structure.ModuleDescriptor;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.runtime.injection.Dependencies;
import org.apache.zest.runtime.injection.DependencyModel;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConcernsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConcernsModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConcernsModel.java
index a1c6b2b..42b7b90 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConcernsModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConcernsModel.java
@@ -27,8 +27,8 @@ import java.util.List;
import java.util.stream.Stream;
import org.apache.zest.api.concern.ConcernsDescriptor;
import org.apache.zest.api.structure.ModuleDescriptor;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.runtime.injection.Dependencies;
import org.apache.zest.runtime.injection.DependencyModel;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConstraintsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConstraintsModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConstraintsModel.java
index 0c0d400..2233dff 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConstraintsModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConstraintsModel.java
@@ -24,8 +24,8 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.zest.api.constraint.ConstraintsDescriptor;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
/**
* JAVADOC
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConstructorModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConstructorModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConstructorModel.java
index 0362682..ae1dffa 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConstructorModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConstructorModel.java
@@ -27,8 +27,8 @@ import java.util.stream.Stream;
import org.apache.zest.api.common.ConstructionException;
import org.apache.zest.api.composite.ConstructorDescriptor;
import org.apache.zest.api.composite.InvalidCompositeException;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.runtime.injection.DependencyModel;
import org.apache.zest.runtime.injection.InjectedParametersModel;
import org.apache.zest.runtime.injection.InjectionContext;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConstructorsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConstructorsModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConstructorsModel.java
index db6c2e1..2ae338c 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConstructorsModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/ConstructorsModel.java
@@ -37,10 +37,10 @@ import org.apache.zest.api.composite.InvalidCompositeException;
import org.apache.zest.api.injection.InjectionScope;
import org.apache.zest.api.injection.scope.Uses;
import org.apache.zest.api.util.Classes;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.HierarchicalVisitorAdapter;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.bootstrap.BindingException;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.HierarchicalVisitorAdapter;
-import org.apache.zest.functional.VisitableHierarchy;
import org.apache.zest.runtime.injection.Dependencies;
import org.apache.zest.runtime.injection.DependencyModel;
import org.apache.zest.runtime.injection.InjectedParametersModel;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/composite/MixinModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/MixinModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/composite/MixinModel.java
index 621237d..82ff417 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/MixinModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/MixinModel.java
@@ -32,8 +32,8 @@ import org.apache.zest.api.mixin.Initializable;
import org.apache.zest.api.mixin.InitializationException;
import org.apache.zest.api.mixin.MixinDescriptor;
import org.apache.zest.api.property.StateHolder;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.runtime.injection.Dependencies;
import org.apache.zest.runtime.injection.DependencyModel;
import org.apache.zest.runtime.injection.InjectedFieldsModel;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/composite/MixinsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/MixinsModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/composite/MixinsModel.java
index d3564c1..3878528 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/MixinsModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/MixinsModel.java
@@ -32,10 +32,10 @@ import java.util.Map;
import java.util.Set;
import java.util.stream.Stream;
import org.apache.zest.api.util.Classes;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.HierarchicalVisitorAdapter;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.bootstrap.BindingException;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.HierarchicalVisitorAdapter;
-import org.apache.zest.functional.VisitableHierarchy;
import org.apache.zest.runtime.injection.Dependencies;
import org.apache.zest.runtime.injection.DependencyModel;
import org.apache.zest.runtime.injection.InjectedFieldModel;
@@ -210,12 +210,16 @@ public class MixinsModel
@Override
public Collection<MixinModel> uses( MixinModel source )
{
+ // System.out.println("BEGIN> MixinsModel.Uses.uses( "+source+" )");
Iterable<Class<?>> thisMixinTypes = source.thisMixinTypes();
List<MixinModel> usedMixinClasses = new ArrayList<MixinModel>();
+ // System.out.println("\tSource Mixin Types and Methods: ");
for( Class thisMixinType : thisMixinTypes )
{
+ // System.out.println("\t\t"+thisMixinType);
for( Method method : thisMixinType.getMethods() )
{
+ // System.out.println("\t\t\t"+method);
if( !Modifier.isStatic( method.getModifiers() ) )
{
MixinModel used = methodImplementation.get( method );
@@ -223,6 +227,7 @@ public class MixinsModel
}
}
}
+ // System.out.println( "END> MixinsModel.Uses.uses( " + source + " )" );
return usedMixinClasses;
}
}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/composite/SideEffectsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/SideEffectsModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/composite/SideEffectsModel.java
index 0e0db3f..4ed29eb 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/SideEffectsModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/SideEffectsModel.java
@@ -28,8 +28,8 @@ import java.util.List;
import java.util.stream.Stream;
import org.apache.zest.api.sideeffect.SideEffectsDescriptor;
import org.apache.zest.api.structure.ModuleDescriptor;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.runtime.injection.Dependencies;
import org.apache.zest.runtime.injection.DependencyModel;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/composite/StateModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/StateModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/composite/StateModel.java
index dfef14e..2f17d61 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/StateModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/StateModel.java
@@ -23,8 +23,8 @@ import java.lang.reflect.AccessibleObject;
import java.util.stream.Stream;
import org.apache.zest.api.common.QualifiedName;
import org.apache.zest.api.composite.StateDescriptor;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.runtime.property.PropertiesModel;
import org.apache.zest.runtime.property.PropertyModel;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/composite/TransientsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/TransientsModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/composite/TransientsModel.java
index 265d26c..e785ca2 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/TransientsModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/TransientsModel.java
@@ -23,8 +23,8 @@ package org.apache.zest.runtime.composite;
import java.util.List;
import java.util.stream.Stream;
import org.apache.zest.api.composite.TransientDescriptor;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
/**
* JAVADOC
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/composite/ValueConstraintsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/ValueConstraintsModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/composite/ValueConstraintsModel.java
index 4971a09..b2febfe 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/ValueConstraintsModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/ValueConstraintsModel.java
@@ -21,8 +21,8 @@
package org.apache.zest.runtime.composite;
import java.util.List;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
/**
* JAVADOC
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/entity/EntitiesModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/entity/EntitiesModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/entity/EntitiesModel.java
index f9dcce2..d1feb77 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/entity/EntitiesModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/entity/EntitiesModel.java
@@ -23,8 +23,8 @@ package org.apache.zest.runtime.entity;
import java.util.List;
import java.util.stream.Stream;
import org.apache.zest.api.entity.EntityDescriptor;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
/**
* Model of entities in a particular Module.
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/entity/EntityStateModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/entity/EntityStateModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/entity/EntityStateModel.java
index c602d76..fec1be6 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/entity/EntityStateModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/entity/EntityStateModel.java
@@ -24,8 +24,8 @@ import java.util.stream.Stream;
import org.apache.zest.api.association.AssociationDescriptor;
import org.apache.zest.api.association.AssociationStateDescriptor;
import org.apache.zest.api.common.QualifiedName;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.runtime.association.AssociationModel;
import org.apache.zest.runtime.association.AssociationsModel;
import org.apache.zest.runtime.association.ManyAssociationModel;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/injection/DependencyModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/injection/DependencyModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/injection/DependencyModel.java
index bc8f914..8110920 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/injection/DependencyModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/injection/DependencyModel.java
@@ -31,10 +31,10 @@ import java.util.stream.Stream;
import org.apache.zest.api.common.ConstructionException;
import org.apache.zest.api.common.Optional;
import org.apache.zest.api.composite.DependencyDescriptor;
+import org.apache.zest.api.util.Visitable;
+import org.apache.zest.api.util.Visitor;
import org.apache.zest.bootstrap.BindingException;
import org.apache.zest.bootstrap.InvalidInjectionException;
-import org.apache.zest.functional.Visitable;
-import org.apache.zest.functional.Visitor;
import org.apache.zest.runtime.injection.provider.CachingInjectionProviderDecorator;
import org.apache.zest.runtime.injection.provider.InjectionProviderException;
import org.apache.zest.runtime.injection.provider.ServiceInjectionProviderFactory;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedFieldModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedFieldModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedFieldModel.java
index 0c13db5..73044ab 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedFieldModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedFieldModel.java
@@ -30,10 +30,10 @@ import java.util.stream.Stream;
import org.apache.zest.api.composite.DependencyDescriptor;
import org.apache.zest.api.composite.InjectedFieldDescriptor;
import org.apache.zest.api.util.Classes;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.bootstrap.BindingException;
import org.apache.zest.bootstrap.InjectionException;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
import org.apache.zest.runtime.composite.TransientInstance;
import org.apache.zest.runtime.model.Resolution;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedFieldsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedFieldsModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedFieldsModel.java
index 125e73a..5fec5e5 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedFieldsModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedFieldsModel.java
@@ -33,8 +33,8 @@ import java.util.stream.Stream;
import org.apache.zest.api.injection.InjectionScope;
import org.apache.zest.api.util.Classes;
import org.apache.zest.api.util.Fields;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
import static org.apache.zest.api.util.Annotations.typeHasAnnotation;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedMethodModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedMethodModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedMethodModel.java
index 0f15a95..39a220b 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedMethodModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedMethodModel.java
@@ -24,9 +24,9 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.stream.Stream;
import org.apache.zest.api.composite.InjectedMethodDescriptor;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.bootstrap.InjectionException;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
/**
* JAVADOC
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedMethodsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedMethodsModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedMethodsModel.java
index b303ea6..9e5538b 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedMethodsModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedMethodsModel.java
@@ -32,8 +32,8 @@ import java.util.stream.Stream;
import org.apache.zest.api.injection.InjectionScope;
import org.apache.zest.api.util.Classes;
import org.apache.zest.api.util.Methods;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
import static org.apache.zest.api.util.Annotations.typeHasAnnotation;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedParametersModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedParametersModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedParametersModel.java
index c057a92..0f1ea4b 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedParametersModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/injection/InjectedParametersModel.java
@@ -24,8 +24,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
import org.apache.zest.api.composite.InjectedParametersDescriptor;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
/**
* JAVADOC
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/object/ObjectModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/object/ObjectModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/object/ObjectModel.java
index 554a026..f64faa9 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/object/ObjectModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/object/ObjectModel.java
@@ -28,8 +28,8 @@ import org.apache.zest.api.mixin.Initializable;
import org.apache.zest.api.mixin.InitializationException;
import org.apache.zest.api.object.ObjectDescriptor;
import org.apache.zest.api.structure.ModuleDescriptor;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
import org.apache.zest.runtime.composite.ConstructorsModel;
import org.apache.zest.runtime.injection.InjectedFieldsModel;
import org.apache.zest.runtime.injection.InjectedMethodsModel;
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/object/ObjectsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/object/ObjectsModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/object/ObjectsModel.java
index 2322f45..b7a2bc8 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/object/ObjectsModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/object/ObjectsModel.java
@@ -22,8 +22,8 @@ package org.apache.zest.runtime.object;
import java.util.List;
import java.util.stream.Stream;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
/**
* JAVADOC
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/property/PropertiesModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/property/PropertiesModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/property/PropertiesModel.java
index cfc77be..30a0fcf 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/property/PropertiesModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/property/PropertiesModel.java
@@ -25,8 +25,8 @@ import java.util.LinkedHashMap;
import java.util.Map;
import java.util.stream.Stream;
import org.apache.zest.api.common.QualifiedName;
-import org.apache.zest.functional.HierarchicalVisitor;
-import org.apache.zest.functional.VisitableHierarchy;
+import org.apache.zest.api.util.HierarchicalVisitor;
+import org.apache.zest.api.util.VisitableHierarchy;
/**
* Base class for properties model
http://git-wip-us.apache.org/repos/asf/zest-java/blob/0b4cca06/core/runtime/src/main/java/org/apache/zest/runtime/property/PropertyModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/property/PropertyModel.java b/core/runtime/src/main/java/org/apache/zest/runtime/property/PropertyModel.java
index d854bb3..b943cbe 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/property/PropertyModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/property/PropertyModel.java
@@ -46,9 +46,9 @@ import org.apache.zest.api.type.ValueType;
import org.apache.zest.api.util.Classes;
import org.apache.zest.api.value.MissingValueSerializationException;
import org.apache.zest.api.value.ValueDeserializer;
+import org.apache.zest.api.util.Visitable;
+import org.apache.zest.api.util.Visitor;
import org.apache.zest.bootstrap.BindingException;
-import org.apache.zest.functional.Visitable;
-import org.apache.zest.functional.Visitor;
import org.apache.zest.runtime.composite.ValueConstraintsInstance;
import org.apache.zest.runtime.model.Binder;
import org.apache.zest.runtime.model.Resolution;