public void registerListenersOnEverything(final Object object) {
        try {
            // the removeListener() call ensures that the listener is not added more than once
            new PropertyVisitor(object) {
                @Override
                protected boolean visitSingleValueProperty(final Property<?> fieldValue) {
                    fieldValue.removeListener(propertyListener);
                    fieldValue.addListener(propertyListener);
                    return true;
                }

                @Override
                protected boolean visitCollectionProperty(final ListProperty<?> fieldValue) {
                    fieldValue.removeListener(listListener);
                    fieldValue.addListener(listListener);
                    return true;
                }

                @Override
                protected boolean visitCollectionProperty(final MapProperty<?, ?> fieldValue) {
                    fieldValue.removeListener(mapListener);
                    fieldValue.addListener(mapListener);
                    return true;
                }

                @Override
                protected boolean visitCollectionProperty(final SetProperty<?> fieldValue) {
                    fieldValue.removeListener(setListener);
                    fieldValue.addListener(setListener);
                    return false;
                }
            };
        } catch (final IllegalAccessException e) {
            topology.onError(new SynchronizeFXException(e));
        } catch (final SecurityException e) {
            topology.onError(new SynchronizeFXException(
                    "Maybe you're JVM doesn't allow reflection for this application?", e));
        }
    }
public void registerListenersOnEverything ( final Object object ) { try { new PropertyVisitor ( object ) { @ Override protected boolean visitSingleValueProperty ( final Property < ? > fieldValue ) { fieldValue . removeListener ( propertyListener ) ; fieldValue . addListener ( propertyListener ) ; return true ; } @ Override protected boolean visitCollectionProperty ( final ListProperty < ? > fieldValue ) { fieldValue . removeListener ( listListener ) ; fieldValue . addListener ( listListener ) ; return true ; } @ Override protected boolean visitCollectionProperty ( final MapProperty < ? , ? > fieldValue ) { fieldValue . removeListener ( mapListener ) ; fieldValue . addListener ( mapListener ) ; return true ; } @ Override protected boolean visitCollectionProperty ( final SetProperty < ? > fieldValue ) { fieldValue . removeListener ( setListener ) ; fieldValue . addListener ( setListener ) ; return false ; } } ; } catch ( final IllegalAccessException e ) { topology . onError ( new SynchronizeFXException ( e ) ) ; } catch ( final SecurityException e ) { topology . onError ( new SynchronizeFXException ( "Maybe you're JVM doesn't allow reflection for this application?" , e ) ) ; } }
Registers listeners on all {@link Property} fields of all Objects contained in {@code model}.

@param object
The root of the object graph where to start registering listeners.