Add ClassFile implementation for class metadata

Prior to this commit, Spring Framework would allow two ways of getting
class metadata:
* `StandardClassMetadata`, using the Java reflection API
* `SimpleMetadataReaderFactory`, using ASM to read the class bytecode

This commit adds a new implementation for this feature, this time using
the new `ClassFile` API which is taken out of preview in Java 24.

See gh-33616
This commit is contained in:
Brian Clozel
2024-11-28 16:27:28 +01:00
parent 28273b9309
commit 4f260a4511
11 changed files with 916 additions and 7 deletions

View File

@@ -11,7 +11,7 @@ apply plugin: "kotlin"
apply plugin: "kotlinx-serialization"
multiRelease {
targetVersions 17, 21
targetVersions 17, 21, 24
}
def javapoetVersion = "1.13.0"
@@ -25,6 +25,10 @@ configurations {
graalvm
}
springFramework {
enableJavaPreviewFeatures = true
}
task javapoetRepackJar(type: ShadowJar) {
archiveBaseName = 'spring-javapoet-repack'
archiveVersion = javapoetVersion