On Tue, 8 Oct 2024 22:10:50 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

> One thing I could not do is to enumerate the properties getter via reflection 
> or BeanInfo/PropertyDescriptor because the class is not accessible 
> com.sun.javafx.application.preferences.PlatformPreferences

Did try to use `pref.getClass()` for your reflection? That won't work. You 
should be able to look up the methods of `Platform.Preferences.class`.

> modules/javafx.graphics/src/main/java/javafx/application/Platform.java line 
> 586:
> 
>> 584:      * @since 22
>> 585:      */
>> 586:     public sealed interface Preferences extends ObservableMap<String, 
>> Object>
> 
> is there any way we can convert this to a regular class here, so it can be 
> inspected?
> 
> what's the point of declaring an interface just to allow for one possible 
> implementation?

No, that would be a mistake. And it's unnecessary.

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

PR Comment: https://git.openjdk.org/jfx/pull/1592#issuecomment-2400918231
PR Review Comment: https://git.openjdk.org/jfx/pull/1592#discussion_r1792572055

Reply via email to