I experimented with setting:
exposureLevel=freemarker.ext.beans.BeansWrapper.EXPOSE_PROPERTIES_ONLY

This seems to prevent records from using anything but the bean properties,
so the components in the record don't get exposed as hash items.
Is there some equivalent so that I could have beans act just as beans
and records act just (more or less) as records (at least as a plan for the 
future)?
Or to filter out methods which don't conform to ZeroArgumentNonVoidMethodPolicy 
(plus indexed methods)?

Cheers,
Simon




On Thursday, 11 April 2024 at 09:42:02 BST, Daniel Dekany 
<daniel.dek...@gmail.com> wrote: 





> So what I plant to do is renaming things to something like these
> (suggestion for better names are welcome):
> 
> ZeroArgumentNonVoidMethodPolicy.BEAN_AWARE_THEN_EXPOSE_AS_METHOD
> ZeroArgumentNonVoidMethodPolicy.BEAN_AWARE_THEN_EXPOSE_AS_PROPERTY
> ZeroArgumentNonVoidMethodPolicy.BEAN_AWARE_THEN_EXPOSE_AS_PROPERTY_AND_METHOD
> 
> And then maybe I would also add policies where we don't care about
> bean stuff, as it should be in theory with records. I don't think many
> user will want such a purist approach, but it can be useful in
> ensuring that our implementation is sound (because then it should be
> possible to implement such a policy).

Reply via email to