polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [13/50] polygene-java git commit: :tools:envisage refine
Date Mon, 15 May 2017 11:03:18 GMT
:tools:envisage refine


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

Branch: refs/heads/develop
Commit: b3f7636091296ee4efe2ed31a879f1beca158f65
Parents: 342ee70
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Mon May 15 10:00:17 2017 +0200
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Mon May 15 10:00:17 2017 +0200

----------------------------------------------------------------------
 .../org/apache/polygene/envisage/Envisage.java  | 18 ++-----------
 .../envisage/detail/DependencyPane.java         |  9 +------
 .../envisage/detail/DetailModelPane.java        |  9 +------
 .../polygene/envisage/detail/MethodPane.java    |  9 +------
 .../polygene/envisage/detail/StatePane.java     |  9 +------
 .../polygene/envisage/graph/GraphBuilder.java   |  3 +--
 .../polygene/envisage/graph/GraphPane.java      | 18 ++-----------
 .../envisage/graph/StackedGraphDisplay.java     |  9 +++----
 .../envisage/tree/StructureModelBuilder.java    |  8 +++---
 .../polygene/envisage/tree/TreeModelPane.java   | 27 ++++----------------
 .../envisage/tree/TypeModelBuilder.java         | 17 ++++++------
 .../envisage/sample/EnvisageSample.java         |  6 ++---
 .../school/config/mail/MailConfiguration.java   |  2 --
 .../domain/person/assembly/PersonEntity.java    |  4 +--
 .../initialdata/SamplePersonInitialData.java    |  4 +--
 .../domain/school/assembly/SchoolEntity.java    |  5 ++--
 .../assembly/SchoolRepositoryService.java       |  3 +--
 .../domain/school/assembly/StudentEntity.java   |  6 ++---
 .../domain/school/assembly/SubjectEntity.java   |  8 +++---
 .../mail/assembly/MailServiceComposite.java     |  5 ++--
 .../infrastructure/mail/assembly/MailValue.java |  3 +--
 .../ApplicationDetailDescriptorBuilder.java     |  9 +------
 .../MethodConcernsDetailDescriptor.java         |  2 +-
 .../MethodConstraintsDetailDescriptor.java      |  2 +-
 .../MethodSideEffectDetailDescriptor.java       |  6 ++---
 .../MethodSideEffectsDetailDescriptor.java      |  2 +-
 .../model/descriptor/MixinDetailDescriptor.java |  6 ++---
 27 files changed, 57 insertions(+), 152 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/main/java/org/apache/polygene/envisage/Envisage.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/main/java/org/apache/polygene/envisage/Envisage.java b/tools/envisage/src/main/java/org/apache/polygene/envisage/Envisage.java
index bf7fe1f..c61e9c1 100644
--- a/tools/envisage/src/main/java/org/apache/polygene/envisage/Envisage.java
+++ b/tools/envisage/src/main/java/org/apache/polygene/envisage/Envisage.java
@@ -50,14 +50,7 @@ public class Envisage
 
         this.application = application;
 
-        SwingUtilities.invokeLater( new Runnable()
-        {
-            @Override
-            public void run()
-            {
-                showMainFrame();
-            }
-        } );
+        SwingUtilities.invokeLater( this::showMainFrame );
     }
 
     public void stop()
@@ -82,14 +75,7 @@ public class Envisage
             @Override
             public void windowOpened( WindowEvent evt )
             {
-                SwingUtilities.invokeLater( new Runnable()
-                {
-                    @Override
-                    public void run()
-                    {
-                        mainFrame.initPolygene();
-                    }
-                } );
+                SwingUtilities.invokeLater( () -> mainFrame.initPolygene() );
             }
         } );
     }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/DependencyPane.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/DependencyPane.java
b/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/DependencyPane.java
index 6dcafad..e93818f 100644
--- a/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/DependencyPane.java
+++ b/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/DependencyPane.java
@@ -92,14 +92,7 @@ import org.apache.polygene.tools.model.descriptor.ObjectDetailDescriptor;
         Dimension minSize = new Dimension( 20, 20 );
         detailPane.setMinimumSize( minSize );
 
-        fieldList.addListSelectionListener( new ListSelectionListener()
-        {
-            @Override
-            public void valueChanged( ListSelectionEvent evt )
-            {
-                fieldListValueChanged( evt );
-            }
-        } );
+        fieldList.addListSelectionListener( this::fieldListValueChanged );
 
         defaultCursor = getCursor();
         linkCursor = LinkEvent.LINK_CURSOR;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/DetailModelPane.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/DetailModelPane.java
b/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/DetailModelPane.java
index 57534ae..691d031 100644
--- a/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/DetailModelPane.java
+++ b/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/DetailModelPane.java
@@ -99,14 +99,7 @@ public final class DetailModelPane
 
     public void setDescriptor( final Object objectDescriptor )
     {
-        SwingUtilities.invokeLater( new Runnable()
-        {
-            @Override
-            public void run()
-            {
-                setDescriptorImpl( objectDescriptor );
-            }
-        } );
+        SwingUtilities.invokeLater( () -> setDescriptorImpl( objectDescriptor ) );
     }
 
     private void setDescriptorImpl( Object objectDescriptor )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/MethodPane.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/MethodPane.java
b/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/MethodPane.java
index afc17b3..75db886 100644
--- a/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/MethodPane.java
+++ b/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/MethodPane.java
@@ -89,14 +89,7 @@ import org.apache.polygene.tools.model.util.DescriptorUtilities;
 
         //splitPane.setResizeWeight( .1 );
         //splitPane.setDividerLocation( .3 );
-        methodList.addListSelectionListener( new ListSelectionListener()
-        {
-            @Override
-            public void valueChanged( ListSelectionEvent evt )
-            {
-                methodListValueChanged( evt );
-            }
-        } );
+        methodList.addListSelectionListener( this::methodListValueChanged );
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/StatePane.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/StatePane.java
b/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/StatePane.java
index 65bc98c..7f6df3c 100644
--- a/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/StatePane.java
+++ b/tools/envisage/src/main/java/org/apache/polygene/envisage/detail/StatePane.java
@@ -94,14 +94,7 @@ import org.apache.polygene.tools.model.util.DescriptorUtilities;
         columnModel.getColumn( 1 ).setPreferredWidth( 400 );
 
         //splitPane.setDividerLocation( .1 );
-        methodList.addListSelectionListener( new ListSelectionListener()
-        {
-            @Override
-            public void valueChanged( ListSelectionEvent evt )
-            {
-                methodListValueChanged( evt );
-            }
-        } );
+        methodList.addListSelectionListener( this::methodListValueChanged );
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/main/java/org/apache/polygene/envisage/graph/GraphBuilder.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/main/java/org/apache/polygene/envisage/graph/GraphBuilder.java
b/tools/envisage/src/main/java/org/apache/polygene/envisage/graph/GraphBuilder.java
index b017c2e..935f768 100644
--- a/tools/envisage/src/main/java/org/apache/polygene/envisage/graph/GraphBuilder.java
+++ b/tools/envisage/src/main/java/org/apache/polygene/envisage/graph/GraphBuilder.java
@@ -21,7 +21,6 @@
 package org.apache.polygene.envisage.graph;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 import org.apache.polygene.tools.model.descriptor.ApplicationDetailDescriptor;
 import org.apache.polygene.tools.model.descriptor.EntityDetailDescriptor;
@@ -160,7 +159,7 @@ import prefuse.data.Table;
             childList.add( obj );
         }
 
-        Collections.sort( childList, nameComparator );
+        childList.sort( nameComparator );
     }
 
     private void buildServicesNode( Node parent, Iterable<ServiceDetailDescriptor>
iter )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/main/java/org/apache/polygene/envisage/graph/GraphPane.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/main/java/org/apache/polygene/envisage/graph/GraphPane.java
b/tools/envisage/src/main/java/org/apache/polygene/envisage/graph/GraphPane.java
index 7fcb0fa..feac087 100644
--- a/tools/envisage/src/main/java/org/apache/polygene/envisage/graph/GraphPane.java
+++ b/tools/envisage/src/main/java/org/apache/polygene/envisage/graph/GraphPane.java
@@ -71,23 +71,9 @@ public final class GraphPane
         this.setLayout( new BorderLayout() );
         add( tabPane, BorderLayout.CENTER );
 
-        treeDisplay.addLinkListener( new LinkListener()
-        {
-            @Override
-            public void activated( LinkEvent evt )
-            {
-                graphItemLinkActivated( evt );
-            }
-        } );
+        treeDisplay.addLinkListener( this::graphItemLinkActivated );
 
-        stackedDisplay.addLinkListener( new LinkListener()
-        {
-            @Override
-            public void activated( LinkEvent evt )
-            {
-                graphItemLinkActivated( evt );
-            }
-        } );
+        stackedDisplay.addLinkListener( this::graphItemLinkActivated );
 
         this.addComponentListener( new ComponentAdapter()
         {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/main/java/org/apache/polygene/envisage/graph/StackedGraphDisplay.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/main/java/org/apache/polygene/envisage/graph/StackedGraphDisplay.java
b/tools/envisage/src/main/java/org/apache/polygene/envisage/graph/StackedGraphDisplay.java
index b7ce32f..24fa2fa 100644
--- a/tools/envisage/src/main/java/org/apache/polygene/envisage/graph/StackedGraphDisplay.java
+++ b/tools/envisage/src/main/java/org/apache/polygene/envisage/graph/StackedGraphDisplay.java
@@ -440,10 +440,8 @@ import prefuse.visual.sort.TreeDepthItemSorter;
 
         private void zoom( final int rotation )
         {
-            SwingUtilities.invokeLater( new Runnable()
-            {
-                @Override
-                public void run()
+            SwingUtilities.invokeLater(
+                () ->
                 {
                     if( rotation == 0 )
                     {
@@ -457,8 +455,7 @@ import prefuse.visual.sort.TreeDepthItemSorter;
                     {
                         zoomIn();
                     }
-                }
-            } );
+                } );
         }
     }
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/main/java/org/apache/polygene/envisage/tree/StructureModelBuilder.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/main/java/org/apache/polygene/envisage/tree/StructureModelBuilder.java
b/tools/envisage/src/main/java/org/apache/polygene/envisage/tree/StructureModelBuilder.java
index 210da21..a59552d 100644
--- a/tools/envisage/src/main/java/org/apache/polygene/envisage/tree/StructureModelBuilder.java
+++ b/tools/envisage/src/main/java/org/apache/polygene/envisage/tree/StructureModelBuilder.java
@@ -21,7 +21,6 @@
 package org.apache.polygene.envisage.tree;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 import javax.swing.tree.DefaultMutableTreeNode;
 import javax.swing.tree.MutableTreeNode;
@@ -76,12 +75,11 @@ import org.apache.polygene.tools.model.util.DescriptorNameComparator;
 
     private void addTypeChildren( DefaultMutableTreeNode parent, List<Object> childList
)
     {
-        Collections.sort( childList, nameComparator );
+        childList.sort( nameComparator );
 
-        for( int i = 0; i < childList.size(); i++ )
+        for( Object child : childList )
         {
-            DefaultMutableTreeNode node = new DefaultMutableTreeNode( childList.get( i )
);
-            parent.add( node );
+            parent.add( new DefaultMutableTreeNode( child ) );
         }
     }
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/main/java/org/apache/polygene/envisage/tree/TreeModelPane.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/main/java/org/apache/polygene/envisage/tree/TreeModelPane.java
b/tools/envisage/src/main/java/org/apache/polygene/envisage/tree/TreeModelPane.java
index b7da25d..48183e1 100644
--- a/tools/envisage/src/main/java/org/apache/polygene/envisage/tree/TreeModelPane.java
+++ b/tools/envisage/src/main/java/org/apache/polygene/envisage/tree/TreeModelPane.java
@@ -112,10 +112,8 @@ public final class TreeModelPane
         gridBagConstraints.weightx = 1.0;
         viewAsPane.add( viewAsCombo, gridBagConstraints );
 
-        viewAsCombo.addItemListener( new ItemListener()
-        {
-            @Override
-            public void itemStateChanged( ItemEvent evt )
+        viewAsCombo.addItemListener(
+            evt ->
             {
                 if( evt.getStateChange() == ItemEvent.DESELECTED )
                 {
@@ -123,8 +121,7 @@ public final class TreeModelPane
                 }
                 cardLayout.show( mainPane, evt.getItem().toString() );
                 repaint();
-            }
-        } );
+            } );
 
         add( viewAsPane, BorderLayout.PAGE_START );
     }
@@ -143,23 +140,9 @@ public final class TreeModelPane
         structureTree.setModel( new DefaultTreeModel( rootNode1 ) );
         typeTree.setModel( new DefaultTreeModel( rootNode2 ) );
 
-        structureTree.addTreeSelectionListener( new TreeSelectionListener()
-        {
-            @Override
-            public void valueChanged( TreeSelectionEvent evt )
-            {
-                structureTreeValueChanged();
-            }
-        } );
+        structureTree.addTreeSelectionListener( evt -> structureTreeValueChanged() );
 
-        typeTree.addTreeSelectionListener( new TreeSelectionListener()
-        {
-            @Override
-            public void valueChanged( TreeSelectionEvent evt )
-            {
-                typeTreeValueChanged();
-            }
-        } );
+        typeTree.addTreeSelectionListener( evt -> typeTreeValueChanged() );
     }
 
     public Object getLastSelected()

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/main/java/org/apache/polygene/envisage/tree/TypeModelBuilder.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/main/java/org/apache/polygene/envisage/tree/TypeModelBuilder.java
b/tools/envisage/src/main/java/org/apache/polygene/envisage/tree/TypeModelBuilder.java
index 7f1b8ef..f3c0800 100644
--- a/tools/envisage/src/main/java/org/apache/polygene/envisage/tree/TypeModelBuilder.java
+++ b/tools/envisage/src/main/java/org/apache/polygene/envisage/tree/TypeModelBuilder.java
@@ -21,7 +21,6 @@
 package org.apache.polygene.envisage.tree;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 import javax.swing.tree.DefaultMutableTreeNode;
 import javax.swing.tree.MutableTreeNode;
@@ -57,12 +56,12 @@ import org.apache.polygene.tools.model.util.DescriptorNameComparator;
         DescriptorNameComparator<Object> nameComparator = new DescriptorNameComparator<>();
 
         // sort based on name order
-        Collections.sort( serviceList, nameComparator );
-        Collections.sort( importedServiceList, nameComparator );
-        Collections.sort( entityList, nameComparator );
-        Collections.sort( transientList, nameComparator );
-        Collections.sort( valueList, nameComparator );
-        Collections.sort( objectList, nameComparator );
+        serviceList.sort( nameComparator );
+        importedServiceList.sort( nameComparator );
+        entityList.sort( nameComparator );
+        transientList.sort( nameComparator );
+        valueList.sort( nameComparator );
+        objectList.sort( nameComparator );
 
         DefaultMutableTreeNode root = new DefaultMutableTreeNode( descriptor );
         DefaultMutableTreeNode child;
@@ -96,9 +95,9 @@ import org.apache.polygene.tools.model.util.DescriptorNameComparator;
 
     private void addChild( DefaultMutableTreeNode node, List list )
     {
-        for( int i = 0; i < list.size(); i++ )
+        for( Object obj : list )
         {
-            node.add( new DefaultMutableTreeNode( list.get( i ) ) );
+            node.add( new DefaultMutableTreeNode( obj ) );
         }
     }
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/test/java/org/apache/polygene/envisage/sample/EnvisageSample.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/test/java/org/apache/polygene/envisage/sample/EnvisageSample.java
b/tools/envisage/src/test/java/org/apache/polygene/envisage/sample/EnvisageSample.java
index 471dea8..03be674 100644
--- a/tools/envisage/src/test/java/org/apache/polygene/envisage/sample/EnvisageSample.java
+++ b/tools/envisage/src/test/java/org/apache/polygene/envisage/sample/EnvisageSample.java
@@ -20,11 +20,11 @@
 
 package org.apache.polygene.envisage.sample;
 
+import org.apache.polygene.api.identity.HasIdentity;
 import org.apache.polygene.api.identity.Identity;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.apache.polygene.api.entity.EntityBuilder;
-import org.apache.polygene.api.entity.EntityComposite;
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.api.unitofwork.UnitOfWorkCompletionException;
@@ -136,7 +136,7 @@ public class EnvisageSample
     }
 
     public interface CarEntity
-        extends Car, EntityComposite
+        extends Car, HasIdentity
     {
     }
 
@@ -148,7 +148,7 @@ public class EnvisageSample
     }
 
     public interface AnimalEntity
-        extends Animal, EntityComposite
+        extends Animal, HasIdentity
     {
     }
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/test/java/org/apache/polygene/envisage/school/config/mail/MailConfiguration.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/config/mail/MailConfiguration.java
b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/config/mail/MailConfiguration.java
index b27c6cc..15888c7 100644
--- a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/config/mail/MailConfiguration.java
+++ b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/config/mail/MailConfiguration.java
@@ -21,11 +21,9 @@
 package org.apache.polygene.envisage.school.config.mail;
 
 import org.apache.polygene.api.common.UseDefaults;
-import org.apache.polygene.api.configuration.ConfigurationComposite;
 import org.apache.polygene.api.property.Property;
 
 public interface MailConfiguration
-    extends ConfigurationComposite
 {
     @UseDefaults
     Property<String> host();

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/assembly/PersonEntity.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/assembly/PersonEntity.java
b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/assembly/PersonEntity.java
index 35fbdfc..10f0fe3 100644
--- a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/assembly/PersonEntity.java
+++ b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/assembly/PersonEntity.java
@@ -20,8 +20,8 @@
 
 package org.apache.polygene.envisage.school.domain.person.assembly;
 
-import org.apache.polygene.api.entity.EntityComposite;
 import org.apache.polygene.api.association.ManyAssociation;
+import org.apache.polygene.api.identity.HasIdentity;
 import org.apache.polygene.api.injection.scope.This;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.property.Property;
@@ -30,7 +30,7 @@ import org.apache.polygene.envisage.school.domain.person.Role;
 
 @Mixins( PersonEntity.PersonMixin.class )
 public interface PersonEntity
-    extends Person, EntityComposite
+    extends Person, HasIdentity
 {
     class PersonMixin
         implements Person

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/initialdata/SamplePersonInitialData.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/initialdata/SamplePersonInitialData.java
b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/initialdata/SamplePersonInitialData.java
index 4ff239d..e3bf5ce 100644
--- a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/initialdata/SamplePersonInitialData.java
+++ b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/initialdata/SamplePersonInitialData.java
@@ -26,7 +26,6 @@ import org.apache.polygene.api.entity.EntityBuilder;
 import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.api.service.ServiceComposite;
 import org.apache.polygene.api.service.ServiceReference;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
@@ -36,7 +35,6 @@ import org.apache.polygene.envisage.school.domain.person.assembly.PersonEntity;
 @Mixins( SamplePersonInitialData.SamplePersonBootstrapMixin.class )
 @Activators( SamplePersonInitialData.Activator.class )
 public interface SamplePersonInitialData
-    extends ServiceComposite
 {
     String EDWARD = "edward";
     String NICLAS = "niclas";
@@ -58,7 +56,7 @@ public interface SamplePersonInitialData
 
     }
 
-    public abstract class SamplePersonBootstrapMixin
+    abstract class SamplePersonBootstrapMixin
         implements SamplePersonInitialData
     {
         private static final String[][] DATAS =

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/SchoolEntity.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/SchoolEntity.java
b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/SchoolEntity.java
index 00610ad..2ee8b0c 100644
--- a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/SchoolEntity.java
+++ b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/SchoolEntity.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.envisage.school.domain.school.assembly;
 
-import org.apache.polygene.api.entity.EntityComposite;
 import org.apache.polygene.api.identity.HasIdentity;
 import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.api.injection.scope.Service;
@@ -44,7 +43,7 @@ import static org.apache.polygene.api.query.QueryExpressions.templateFor;
 
 @Mixins( SchoolEntity.SchoolMixin.class )
 public interface SchoolEntity
-    extends School, EntityComposite
+    extends School, HasIdentity
 {
     class SchoolMixin
         implements School
@@ -112,7 +111,7 @@ public interface SchoolEntity
         }
     }
 
-    static interface SchoolState
+    interface SchoolState
     {
         Property<String> name();
     }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/SchoolRepositoryService.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/SchoolRepositoryService.java
b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/SchoolRepositoryService.java
index 78507b1..f850b3c 100644
--- a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/SchoolRepositoryService.java
+++ b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/SchoolRepositoryService.java
@@ -25,7 +25,6 @@ import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.query.Query;
 import org.apache.polygene.api.query.QueryBuilder;
 import org.apache.polygene.api.query.QueryBuilderFactory;
-import org.apache.polygene.api.service.ServiceComposite;
 import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
 import org.apache.polygene.envisage.school.domain.school.School;
 import org.apache.polygene.envisage.school.domain.school.SchoolRepository;
@@ -35,7 +34,7 @@ import static org.apache.polygene.api.query.QueryExpressions.templateFor;
 
 @Mixins( SchoolRepositoryService.SchoolRepositoryMixin.class )
 public interface SchoolRepositoryService
-    extends SchoolRepository, ServiceComposite
+    extends SchoolRepository
 {
 
     class SchoolRepositoryMixin

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/StudentEntity.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/StudentEntity.java
b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/StudentEntity.java
index 4fc1659..da174ec 100644
--- a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/StudentEntity.java
+++ b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/StudentEntity.java
@@ -22,7 +22,7 @@ package org.apache.polygene.envisage.school.domain.school.assembly;
 
 import org.apache.polygene.api.association.Association;
 import org.apache.polygene.api.association.ManyAssociation;
-import org.apache.polygene.api.entity.EntityComposite;
+import org.apache.polygene.api.identity.HasIdentity;
 import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.api.injection.scope.This;
 import org.apache.polygene.api.mixin.Mixins;
@@ -33,7 +33,7 @@ import org.apache.polygene.envisage.school.domain.school.Subject;
 
 @Mixins( StudentEntity.StudentMixin.class )
 public interface StudentEntity
-    extends Student, EntityComposite
+    extends Student, HasIdentity
 {
     class StudentMixin
         implements Student
@@ -54,7 +54,7 @@ public interface StudentEntity
         }
     }
 
-    static interface StudentState
+    interface StudentState
     {
         ManyAssociation<Subject> subjects();
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/SubjectEntity.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/SubjectEntity.java
b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/SubjectEntity.java
index 874aa71..b89a40f 100644
--- a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/SubjectEntity.java
+++ b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/school/assembly/SubjectEntity.java
@@ -21,7 +21,7 @@
 package org.apache.polygene.envisage.school.domain.school.assembly;
 
 import org.apache.polygene.api.association.Association;
-import org.apache.polygene.api.entity.EntityComposite;
+import org.apache.polygene.api.identity.HasIdentity;
 import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.api.injection.scope.This;
 import org.apache.polygene.api.mixin.Mixins;
@@ -31,9 +31,9 @@ import org.apache.polygene.envisage.school.domain.school.Subject;
 
 @Mixins( SubjectEntity.SubjectMixin.class )
 public interface SubjectEntity
-    extends Subject, EntityComposite
+    extends Subject, HasIdentity
 {
-    public class SubjectMixin
+    class SubjectMixin
         implements Subject
     {
         @This
@@ -58,7 +58,7 @@ public interface SubjectEntity
         }
     }
 
-    static interface SubjectState
+    interface SubjectState
     {
         Property<String> name();
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/test/java/org/apache/polygene/envisage/school/infrastructure/mail/assembly/MailServiceComposite.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/infrastructure/mail/assembly/MailServiceComposite.java
b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/infrastructure/mail/assembly/MailServiceComposite.java
index c55fe02..4912254 100644
--- a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/infrastructure/mail/assembly/MailServiceComposite.java
+++ b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/infrastructure/mail/assembly/MailServiceComposite.java
@@ -22,7 +22,6 @@ package org.apache.polygene.envisage.school.infrastructure.mail.assembly;
 
 import org.apache.polygene.api.configuration.Configuration;
 import org.apache.polygene.api.injection.scope.This;
-import org.apache.polygene.api.service.ServiceComposite;
 import org.apache.polygene.envisage.school.config.mail.MailConfiguration;
 import org.apache.polygene.envisage.school.infrastructure.mail.Mail;
 import org.apache.polygene.envisage.school.infrastructure.mail.MailService;
@@ -30,9 +29,9 @@ import org.apache.polygene.envisage.school.infrastructure.mail.MailService;
 import java.util.Arrays;
 
 public interface MailServiceComposite
-    extends MailService, ServiceComposite
+    extends MailService
 {
-    public static class MailServiceMixin
+    class MailServiceMixin
         implements MailService
     {
         @This

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/envisage/src/test/java/org/apache/polygene/envisage/school/infrastructure/mail/assembly/MailValue.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/infrastructure/mail/assembly/MailValue.java
b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/infrastructure/mail/assembly/MailValue.java
index 50533cf..e1a0e36 100644
--- a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/infrastructure/mail/assembly/MailValue.java
+++ b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/infrastructure/mail/assembly/MailValue.java
@@ -20,10 +20,9 @@
 
 package org.apache.polygene.envisage.school.infrastructure.mail.assembly;
 
-import org.apache.polygene.api.value.ValueComposite;
 import org.apache.polygene.envisage.school.infrastructure.mail.Mail;
 
 public interface MailValue
-    extends Mail, ValueComposite
+    extends Mail
 {
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ApplicationDetailDescriptorBuilder.java
----------------------------------------------------------------------
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ApplicationDetailDescriptorBuilder.java
b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ApplicationDetailDescriptorBuilder.java
index cb3f574..6957732 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ApplicationDetailDescriptorBuilder.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ApplicationDetailDescriptorBuilder.java
@@ -460,14 +460,7 @@ public final class ApplicationDetailDescriptorBuilder
 
         private LayerDetailDescriptor getLayerDetailDescriptor( LayerDescriptor aDescriptor
)
         {
-            LayerDetailDescriptor detailDescriptor = layerDescToDetail.get( aDescriptor );
-            if( detailDescriptor == null )
-            {
-                detailDescriptor = new LayerDetailDescriptor( aDescriptor );
-                layerDescToDetail.put( aDescriptor, detailDescriptor );
-            }
-
-            return detailDescriptor;
+            return layerDescToDetail.computeIfAbsent( aDescriptor, LayerDetailDescriptor::new
);
         }
 
         private void resetInjectableRelatedVariables()

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConcernsDetailDescriptor.java
----------------------------------------------------------------------
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConcernsDetailDescriptor.java
b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConcernsDetailDescriptor.java
index 0ff1479..0d644b5 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConcernsDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConcernsDetailDescriptor.java
@@ -35,7 +35,7 @@ public final class MethodConcernsDetailDescriptor
     {
         Objects.requireNonNull( aDescriptor, "aDescriptor" );
         descriptor = aDescriptor;
-        concerns = new LinkedList<MethodConcernDetailDescriptor>();
+        concerns = new LinkedList<>();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConstraintsDetailDescriptor.java
----------------------------------------------------------------------
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConstraintsDetailDescriptor.java
b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConstraintsDetailDescriptor.java
index 87efc17..8b0f6cd 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConstraintsDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConstraintsDetailDescriptor.java
@@ -35,7 +35,7 @@ public final class MethodConstraintsDetailDescriptor
     {
         Objects.requireNonNull( aDescriptor, "aDescriptor" );
         descriptor = aDescriptor;
-        constraints = new LinkedList<MethodConstraintDetailDescriptor>();
+        constraints = new LinkedList<>();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodSideEffectDetailDescriptor.java
----------------------------------------------------------------------
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodSideEffectDetailDescriptor.java
b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodSideEffectDetailDescriptor.java
index a043ef8..484e031 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodSideEffectDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodSideEffectDetailDescriptor.java
@@ -39,9 +39,9 @@ public final class MethodSideEffectDetailDescriptor
     {
         Objects.requireNonNull( aDescriptor, "aDescriptor" );
         descriptor = aDescriptor;
-        constructors = new LinkedList<ConstructorDetailDescriptor>();
-        injectedMethods = new LinkedList<InjectedMethodDetailDescriptor>();
-        injectedFields = new LinkedList<InjectedFieldDetailDescriptor>();
+        constructors = new LinkedList<>();
+        injectedMethods = new LinkedList<>();
+        injectedFields = new LinkedList<>();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodSideEffectsDetailDescriptor.java
----------------------------------------------------------------------
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodSideEffectsDetailDescriptor.java
b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodSideEffectsDetailDescriptor.java
index e8c321c..9be166b 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodSideEffectsDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodSideEffectsDetailDescriptor.java
@@ -36,7 +36,7 @@ public final class MethodSideEffectsDetailDescriptor
         Objects.requireNonNull( aDescriptor, "aDescriptor" );
 
         descriptor = aDescriptor;
-        sideEffects = new LinkedList<MethodSideEffectDetailDescriptor>();
+        sideEffects = new LinkedList<>();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b3f76360/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MixinDetailDescriptor.java
----------------------------------------------------------------------
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MixinDetailDescriptor.java
b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MixinDetailDescriptor.java
index dfc1f6c..544efdb 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MixinDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MixinDetailDescriptor.java
@@ -38,9 +38,9 @@ public final class MixinDetailDescriptor
     {
         Objects.requireNonNull( aDescriptor, "aDescriptor" );
         descriptor = aDescriptor;
-        constructors = new LinkedList<ConstructorDetailDescriptor>();
-        injectedMethods = new LinkedList<InjectedMethodDetailDescriptor>();
-        injectedFields = new LinkedList<InjectedFieldDetailDescriptor>();
+        constructors = new LinkedList<>();
+        injectedMethods = new LinkedList<>();
+        injectedFields = new LinkedList<>();
     }
 
     /**


Mime
View raw message