On Fri, 21 Feb 2025 21:42:03 GMT, John Hendrikx <jhendr...@openjdk.org> wrote:

>> modules/javafx.base/src/main/java/com/sun/javafx/binding/ListenerManagerBase.java
>>  line 41:
>> 
>>> 39:  * @param <I> the type of the instance providing listener data
>>> 40:  */
>>> 41: public abstract class ListenerManagerBase<T, I extends 
>>> ObservableValue<? extends T>> {
>> 
>> Is this a class and not an interface because of the need for `protected` 
>> methods?
>
> I think I extracted this when I discovered that I needed two implementations 
> (caching one and one that doesn't need caching, to save more memory).
> 
> Looking at it now (over a year later) I suppose it could also be an 
> interface.  There is no risk that any of this gets exposed as the property 
> classes will all create a private class to implement the abstract methods.
> 
> It can be changed at any time as it is internal.  If we want to make it an 
> interface, I'm going to need to think of a good name for it 
> (`ListenerDataProvider`, `ListenerDataStore`, ... )

Just making sure you didn't forget to consider this. Fine to leave as is also.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1081#discussion_r1990401323

Reply via email to