You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be convenient to provide a way to easily get the string name for enumerated values. For instance to get the name of a currencyCode as a Java String.
Context
It's not a bug, but feature request.
Expected Behavior
Calling myEnum.toString() should return the name of the enum as a Java String.
Actual Behavior
The application has to create string representations (e.g., through myEnum.name()) by hand.
Possible Fix
Add a toString() method for enums, maybe using .name() for enums.
Working on an application where CTO models are generated to Java with additional fixes for the Corda network. Monetary amounts CTO representations which include an enum for currency codes are converted to Java Currency classes.
Your Environment
Version used: 0.70.2
Environment name and version (e.g. Chrome 39, node.js 5.4): node 8
Operating System and version (desktop or mobile): MacOS
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs in the next 14 days. Thank you for your contributions.
This issue has been automatically closed because no further activity occurred. If you believe the issue is still relevant, please either reopen this issue, open a new issue, or contact one of the project maintainers
It would be convenient to provide a way to easily get the string name for enumerated values. For instance to get the name of a currencyCode as a Java String.
Context
It's not a bug, but feature request.
Expected Behavior
Calling
myEnum.toString()
should return the name of the enum as a Java String.Actual Behavior
The application has to create string representations (e.g., through
myEnum.name()
) by hand.Possible Fix
Add a
toString()
method for enums, maybe using.name()
for enums.Steps to Reproduce
N/A
Existing issues
None found.
Context
Working on an application where CTO models are generated to Java with additional fixes for the Corda network. Monetary amounts CTO representations which include an enum for currency codes are converted to Java Currency classes.
Your Environment
The text was updated successfully, but these errors were encountered: