EnumHelper

public final class EnumHelper

This is a helper class, used while generating enums in MDS.

Methods

prefixEnumValue

public static String prefixEnumValue(String value)

Prefixes enum values, if they start with illegal character (other than letter, dollar sign or underscore

Parameters:
  • value – an enum value
Returns:

either the same value, if the value is legal, or value prefixed with underscore, if the value is illegal

prefixEnumValues

public static Collection<String> prefixEnumValues(Collection<String> values)

Prefixes a collection of enum values. For each value in the collection, prefixEnumValue(java.lang.String) is called.

Parameters:
  • values – a collection of enum values
Returns:

a collection of prefixed values