[MDSAL-364] Generate unions generate getValue() Created: 18/Jul/18  Updated: 04/Aug/18  Resolved: 24/Jul/18

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

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

Issue Links:
Duplicate
duplicates MDSAL-130 Java Binding: improve union type impl... Resolved
Relates
relates to TSC-130 Generated unions will lose getValue()... Resolved

 Description   

Unions have a synthetic getValue() method, which returns a char[], as well as a corresponding constructor. This was needed for Config Subsystem and its use of JMX and is superfluous with that component gone.

Furthermore the synthetic method encroaches on method namespace which is populated by names from model - hence some constructs would end up not being generated correctly.

Fix this by generating a stringValue() synthetic method, without the ceremony in binding model itself. Union objects can still be instantiated using their associated Builder's getDefaultInstance() method.


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