Add tests, refine API contracts and reflect it in the documentation, remove methods that seem useful but are rather polluting the API.
Original Pull Request: #3357
Add opinionated builders for return statements and invocations, add introspection type for MethodReturns to reduce checks for e.g. `Optional` and `void` and utilities to construct type names.
Closes: #3357
Throw MappingException referring to the entity type for easier debugging of the property creation chain.
Add exclusion for properties starting with $$_ (synthetic Hibernate fields). Exclude java.util and javax types from AOT entity processing as well as arrays.
See #2595
Original Pull Request: #3318
Move off TypeReference for known and loaded classes for easier handling. Introduce configuration for enabled and include/exclude filters. Refactor configuration to functional style.
Original Pull Request: #3318
We now pre-initialize ClassGeneratingPropertyAccessorFactory and ClassGeneratingEntityInstantiator infrastructure to generate bytecode for their respective classes so that we include the generated code for the target AOT package. Also, we check for presence of these types to conditionally load generated classes if these are on the classpath.
This change required a stable class name therefore, we're hashing the fully-qualified class name and have aligned the class name from _Accessor to __Accessor (two underscores instead of one, same for Instantiator).
Closes: #2595
Original Pull Request: #3318
Prior to this change regenerating repository instances for eg. test execution caused trouble when trying to override existing json metadata files. We now back off in case of existing files and added an explicit config flag for users to opt out of having the metadata file being present in the target resources.
Original pull request: #3355Closes#3354
Filter Enable…Repositories(fragmentsContributor) attribute values that point to an interface to enable defaulting in Enable…Repositories annotations.
See #3279
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