[MDSAL-753] Generate a switch expression for enum's forName()/forValue() methods Created: 23/Apr/22  Updated: 26/Apr/22  Resolved: 26/Apr/22

Status: Resolved
Project: mdsal
Component/s: Binding codegen
Affects Version/s: None
Fix Version/s: 10.0.0

Type: Improvement Priority: Medium
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MDSAL-754 Generate ofName() and ofValue() for e... Resolved
Epic Link: Java 17

 Description   

Our current codegen uses an ImmutableMap to lookup members by name and by value.
With JDK17 we can use switch expressions . This will allow us expose what we are doing directly to Java in a very concise form. We will also reduce runtime overhead, as we will no longer need the maps.


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