-
New Feature
-
Resolution: Done
-
Medium
-
None
-
None
-
None
VPP API supports enums since introduction of new vppapigen:
https://gerrit.fd.io/r/#/c/8781/23
JVPP generation needs to be refactored first.
Either VPP-480 or vppapigen plugin (https://gerrit.fd.io/r/#/c/8781/).
Proposed template:
enum_template = Template(""" package $plugin_package.$type_package; /** * <p>This class represents $enum_name enum definition. * <br>It was generated by enum_gen.py based on $inputfile preparsed data: * <pre> $docs * </pre> */ public enum $java_enum_name \{ $fields public final $value_type value; $java_enum_name(final $value_type value) \{ this.value = value; } public static $java_enum_name forValue(final $value_type value) \{ for ($java_enum_name enumeration : $java_enum_name.values()) \{ if (value == enumeration.value) \{ return enumeration; } } return null; } }
- is blocked by
-
VPP-480 Refactor JVPP generator code
-
- Closed
-