hibernate / hibernate-models

An abstraction over "reflection" and annotations
Apache License 2.0
2 stars 5 forks source link

Remove createUsage methods that take a lambda callback #68

Closed beikov closed 2 months ago

beikov commented 2 months ago

There is AnnotationDescriptor#ceateUsage and maybe utility methods that take a lambda callback for initializing the MutableAnnotationUsage. Since that essentially produces anonymous hidden classes at runtime, this should IMO be removed. The value of those methods is questionable anyway.

mbladel commented 2 months ago

WDYT about removing the lambda configuration from DynamicClassDetails#applyAttribute as well? After all that method returns the DynamicFieldDetails it created so one can simply apply the configuration on the returned value.