@Test public void testInitModelUpdate() { CompositeAspectDefinition composite = new CompositeAspectDefinition(aspect1, aspect2NotSupported, aspect3); composite.initModelUpdate(propertyDispatcher, componentWrapper, modelUpdated); verify(aspect1).supports(WrapperType.FIELD); verify(aspect2NotSupported).supports(WrapperType.FIELD); verify(aspect3).supports(WrapperType.FIELD); verify(aspect1).initModelUpdate(propertyDispatcher, componentWrapper, modelUpdated); verify(aspect2NotSupported, never()).initModelUpdate(propertyDispatcher, componentWrapper, modelUpdated); verify(aspect3).initModelUpdate(propertyDispatcher, componentWrapper, modelUpdated); }
@Override public void initModelUpdate(PropertyDispatcher propertyDispatcher, ComponentWrapper componentWrapper, Handler modelUpdated) { aspectDefinitions .stream() .filter(d -> d.supports(componentWrapper.getType())) .forEach(lad -> { try { lad.initModelUpdate(propertyDispatcher, componentWrapper, modelUpdated); } catch (RuntimeException e) { throw new LinkkiBindingException( e.getMessage() + " while init model update of " + lad.getClass().getSimpleName() + " for " + componentWrapper + " <=> " + propertyDispatcher, e); } }); }
CompositeAspectDefinition implements LinkkiAspectDefinition { @Override public void initModelUpdate(PropertyDispatcher propertyDispatcher, ComponentWrapper componentWrapper, Handler modelUpdated) { aspectDefinitions .stream() .filter(d -> d.supports(componentWrapper.getType())) .forEach(lad -> { try { lad.initModelUpdate(propertyDispatcher, componentWrapper, modelUpdated); } catch (RuntimeException e) { throw new LinkkiBindingException( e.getMessage() + " while init model update of " + lad.getClass().getSimpleName() + " for " + componentWrapper + " <=> " + propertyDispatcher, e); } }); } }
CompositeAspectDefinition implements LinkkiAspectDefinition { @Override public void initModelUpdate(PropertyDispatcher propertyDispatcher, ComponentWrapper componentWrapper, Handler modelUpdated) { aspectDefinitions .stream() .filter(d -> d.supports(componentWrapper.getType())) .forEach(lad -> { try { lad.initModelUpdate(propertyDispatcher, componentWrapper, modelUpdated); } catch (RuntimeException e) { throw new LinkkiBindingException( e.getMessage() + " while init model update of " + lad.getClass().getSimpleName() + " for " + componentWrapper + " <=> " + propertyDispatcher, e); } }); } CompositeAspectDefinition(@NonNull LinkkiAspectDefinition... aspectDefinitions);  CompositeAspectDefinition(List<LinkkiAspectDefinition> aspectDefinitions); }
CompositeAspectDefinition implements LinkkiAspectDefinition { @Override public void initModelUpdate(PropertyDispatcher propertyDispatcher, ComponentWrapper componentWrapper, Handler modelUpdated) { aspectDefinitions .stream() .filter(d -> d.supports(componentWrapper.getType())) .forEach(lad -> { try { lad.initModelUpdate(propertyDispatcher, componentWrapper, modelUpdated); } catch (RuntimeException e) { throw new LinkkiBindingException( e.getMessage() + " while init model update of " + lad.getClass().getSimpleName() + " for " + componentWrapper + " <=> " + propertyDispatcher, e); } }); } CompositeAspectDefinition(@NonNull LinkkiAspectDefinition... aspectDefinitions);  CompositeAspectDefinition(List<LinkkiAspectDefinition> aspectDefinitions); @Override Handler createUiUpdater(PropertyDispatcher propertyDispatcher, ComponentWrapper componentWrapper); @Override void initModelUpdate(PropertyDispatcher propertyDispatcher,
            ComponentWrapper componentWrapper,
            Handler modelUpdated); @Override boolean supports(WrapperType type); }
CompositeAspectDefinition implements LinkkiAspectDefinition { @Override public void initModelUpdate(PropertyDispatcher propertyDispatcher, ComponentWrapper componentWrapper, Handler modelUpdated) { aspectDefinitions .stream() .filter(d -> d.supports(componentWrapper.getType())) .forEach(lad -> { try { lad.initModelUpdate(propertyDispatcher, componentWrapper, modelUpdated); } catch (RuntimeException e) { throw new LinkkiBindingException( e.getMessage() + " while init model update of " + lad.getClass().getSimpleName() + " for " + componentWrapper + " <=> " + propertyDispatcher, e); } }); } CompositeAspectDefinition(@NonNull LinkkiAspectDefinition... aspectDefinitions);  CompositeAspectDefinition(List<LinkkiAspectDefinition> aspectDefinitions); @Override Handler createUiUpdater(PropertyDispatcher propertyDispatcher, ComponentWrapper componentWrapper); @Override void initModelUpdate(PropertyDispatcher propertyDispatcher,
            ComponentWrapper componentWrapper,
            Handler modelUpdated); @Override boolean supports(WrapperType type);  }