[MDSAL-737] Eliminate the use of Java reflection from mdsal-binding-dom-codec Created: 17/Mar/22  Updated: 09/Jan/24

Status: Confirmed
Project: mdsal
Component/s: Binding runtime
Affects Version/s: None
Fix Version/s: 14.0.0

Type: Epic Priority: Medium
Reporter: Robert Varga Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Name: No runtime reflection

 Description   

mdsal-binding-runtime-api coupled with GeneratedType should be able provide us with authoritative information about class layout we are expected to encounter at runtime.

For historical reasons there is a ton for fiddling with java.lang.Class and its shape via BindingReflections. Gradually migrate all reliance on Reflection and instead perform inferences on GeneratedType, which really gives us the same information that is input mdsal-binding-java-api-generator.

Whenever the class shape does not match at runtime, just throw a LinkageError, as at this point we expect BindingRuntimeContext (and more importantly BindingRuntimeTypes) to have a proper self-contained view of the classes present at runtime.

This is a prerequisite to being able to execute Binding Spec in images in AOT environments.


Generated at Wed Feb 07 20:10:48 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.