I have a use case where I would like to access an enum instance with an alias of that enum.
The reason that I would like to access the enum instance with an alias is to allow accessing a value of an enum with non English characters (my specific use case is Hebrew).
The thing is that this is part of a framework and I need to be able to add multiple aliases to any given enum. It is needed to allow more natural language, as for the alias given would be used as part of a specification (gauge-java).
Any suggestions on how to do it properly?
EDIT: I'm adding an example:
Go to "בית"
this is a step that would be mapped to a method:
@Step("Go to <page>")
public void goToPage(Page page) {...}
Since enum values are not good for specification by means of readability then you want to replace them with readable words. According to documentation you can pass enum as step parameter but in your case you can pass string as you want and then in the step method just to create enum from string using Factory class:
Then your step will be (of course in Hebrew)