floodlight/loxigen — pull request #336 by andi-bigswitch (2014-10-24 03:18:54+00:00)
Title: java_gen: generate getStableValue() for 'stable' enums

Reviewer: @rlane @Sovietaced
CC: @wolverineav

'stable' enums are enums whose wire values are guaranteed to not change
between versions. For this enums, we can generate the wire value
into the 'symbolic' enums as "stableValue" to make them more easily
accessible.

This commit does a bit of housekeeping to pass the 'stable' information
into the JavaEnum. Then, for stable enums, we add a 'stableValue'
EnumPropertyMetadata field that generates the values into the enum.