Java 类org.eclipse.emf.edit.provider.ChangeNotifier 实例源码

项目:OpenSPIFe    文件:TransactionUtils.java   
private ComposedAdapterFactoryImpl(Registry adapterFactoryDescriptorRegistry) {
    super(adapterFactoryDescriptorRegistry);
    changeNotifier = new ChangeNotifier() {

        @Override
        public void fireNotifyChanged(Notification notification) {
            int size = size();
            INotifyChangedListener[] listeners = new INotifyChangedListener[size];
            toArray(listeners);
            int expectedModCount = modCount;
            for (int i = 0; i < size; ++i) {
                INotifyChangedListener notifyChangedListener = listeners[i];
                if (notifyChangedListener == null) {
                    continue;
                }
                if (expectedModCount == modCount || this.contains(notifyChangedListener)) {
                    notifyChangedListener.notifyChanged(notification);
                }
            }
        }

    };
}