Remove test-only methods and move these into the tests. Improve encapsulation.
Move AotRepositoryBeanDefinitionPropertiesDecorator from config to aot.generate package due to its strong coupling with aot.generate packages.
See: #3344
Original pull request: #3351
Decouple AOT processing as we previously created metadata and generated code. Also, reduce access of implementation modules to their required scope instead of allowing direct modification of the type and method/constructor.
Closes: #3344
Original pull request: #3351
This change makes sure register AOT repository code with a generated typename. This is necessary to allow recreation for repository code with different configuration/context settings during tests.
Closes#3339
Original pull request: #3345
ExpressionMarker is a stateful abstraction that helps creating local classes used to obtain the enclosing method. The code generation will only add the local class when needed. Prior to this change markers had been added unconditionally to each and every method.
Closes#3338
We now create a decoupled instance of ClassTypeInformation to avoid initialization visibility cycle issues when TypeInformation.OBJECT (and other fields) are initialized with null because ClassTypeInformation.OBJECT hasn't been initialized yet.
Closes#3340
Make method generation context available for subclassing which allows dedicated tests to be implemented in store modules without having to bootstrap the entire AOT facility. This also demanded to change visibility of fragment metadata.
Along the way fixed json rendering of method metadata by wrapping nested values in json objects. This allows to print out values of eg. list type as json array.
Added test to cover json repository metadata rendering and storage.
See: #3265
We now fetch mapping contexts from Iterable<MappingContext> later, when accessing PersistentEntities API to defer potential resolution when e.g. obtaining beans from a BeanFactory.
Closes#3310
The move to Kotlin 2.x introduces warnings in the Kotlin extensions for type arguments tha are not within their bounds (i.e. `Thing<T>` should be `Thing<T : Any>`). This commit fixes these cases and removes the warnings.
Signed-off-by: Chris Bono <chris.bono@broadcom.com>
Closes#3309
Use getPackageName() instead of getPackage().getName(), remove essentially duplicate tests and fix array type handling of Q types by using the arrays component type for assignability checks.
Original Pull Request: #3284
This commit introduces a warning log if a parameter is not annotated with `@ProjectedPayload` that this style is deprecated and that we will drop support for projections if a parameter (or the parameter type) is not explicitly annotated with `@ProjectedPayload`.
Resolves#3300
Original pull request: #3303
Signed-off-by: Chris Bono <chris.bono@broadcom.com>
If the collection type is not a store-native type, we no longer issue a warn log. Converters can be registered for List or Collection types and convert into a different, non-collection type while being a support converter instead of forcing a specific write type.
This is e.g. the case for MongoDB where a List of numbers is converted to the Vector type.
Closes#3306
>> There are no guarantees on the type, mutability, serializability, or thread-safety of the List returned
`Collector.toList()` doesn't guarantee mutability, then passing it to `Collections.reverse()` is not safe.
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
Closes#3304