On Wed, 7 Aug 2024 15:21:18 GMT, John Hendrikx <jhendr...@openjdk.org> wrote:
>> I just think it's much simpler than an annotation... >> >> Or it could be a public instance method `boolean isSupportReconstruction()` >> for the child classes to override, saving N (1? 8?) bytes per instance. > > But the annotation costs no bytes per instance, if that even matters, as I > thought these were singletons so it looks like we're quite into > micro-optimization territory here. Whether a style converter supports reconstruction should be a statement about the type, not a statement about the instance. For this reason, I don't prefer an instance method like `isSupportReconstruction()`. In any case, these are our options: 1. Boolean parameter / Feature enum passed to constructor 2. Instance method `isSupportReconstruction()` 3. Annotation 4. Empty marker interface 5. Interface with the `convertBack` method 6. Subclassing I lean slightly towards the annotation, but I'm generally okay with either option. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1522#discussion_r1707281230