public class LegacyEnum extends BaseObject implements java.lang.Comparable<LegacyEnum>
Modifier and Type | Class and Description |
---|---|
protected static class |
LegacyEnum.EnumControlRecord<E extends LegacyEnum>
Stores the static data associated with a given enum subclass.
|
protected static interface |
LegacyEnum.EnumInitializer<E extends LegacyEnum>
Post-process a new enum to set state.
|
protected static interface |
LegacyEnum.NameLookupHelper<E extends LegacyEnum>
Helper to lookup a predefined enum by its name.
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
name
The case-preserved legacy name for the enum.
|
private static java.util.Map<java.lang.Class<?>,LegacyEnum.EnumControlRecord> |
registry
Maps enum classes to their control record.
|
private java.lang.String |
symname
Override for the symbol name in cases where it is different from the enum name.
|
private static java.lang.String |
TO_SPEC
ToObject error message specification.
|
protected long |
value
The 64-bit enum value.
|
Modifier | Constructor and Description |
---|---|
protected |
LegacyEnum(java.lang.String name,
long value)
Construct an immutable enum instance with the given state.
|
Modifier and Type | Method and Description |
---|---|
long |
_getValue()
Returns the 64-bit value of the enum.
|
private static boolean |
checkTypes(java.lang.Object o1,
java.lang.Object o2)
Check if the data types represent the same exact enum class, raise error 223 if they are different.
|
int |
compareTo(LegacyEnum enm)
Compares this instance with the specified instance and returns -1 if this instance is less than the
instance specified, 0 if the two instances are equal and 1 if this instance is greater than the
specified instance.
|
integer |
compareTo(object<? extends LegacyEnum> that)
Compares this instance with the specified instance and returns -1 if this instance is less than the
given instance, 0 if the two instances are equal and 1 if this instance is greater than the given
instance.
|
private static int |
compareValues(LegacyEnum e1,
LegacyEnum e2)
Regular enum comparator.
|
int |
compareWorker(LegacyEnum that)
Compares this instance with the specified instance and returns -1 if this instance is less
than the given instance, 0 if the two instances are equal and 1 if this instance is greater
than the given instance.
|
protected static <T extends LegacyEnum> |
createEnum(java.lang.Class<T> cls,
java.lang.String name)
Implicitly create the enum instance by incrementing the value from the most recently created enum.
|
protected static <T extends LegacyEnum> |
createEnum(java.lang.Class<T> cls,
java.lang.String name,
long value)
Explicitly create an enum instance with the specified value and legacy name.
|
protected static <T extends LegacyEnum> |
createEnum(java.lang.Class<T> cls,
java.lang.String name,
java.lang.String alias)
Explicitly create the enum instance with the given name but with the value from the specified alias.
|
private static <T extends LegacyEnum> |
createEnumWorker(LegacyEnum.EnumControlRecord<T> ecr,
java.lang.String name,
long value,
T pattern)
Initialize the enum instance with the specified value and legacy name.
|
protected static <T extends LegacyEnum> |
createWorker(java.lang.Class<T> cls,
java.lang.String name,
long value)
Create a new instance and return it.
|
protected static java.lang.String |
dumpEnum(LegacyEnum en)
Render an enum (name and value) into a simple string.
|
protected static java.lang.String |
dumpEnums(java.util.Collection<LegacyEnum> list)
Render a list of enums (name and value) into a string.
|
boolean |
equals(java.lang.Object obj)
Determines if this instance and the given instance are equivalent.
|
static boolean |
failEnumInstantiation(java.lang.Class<?> cls)
Generate an error 17971 if this is an attempt to instantiate an enum type.
|
static <T extends LegacyEnum> |
findClass(character cname,
java.lang.Runnable unknown,
java.util.function.Consumer<java.lang.String> noFind)
Return the enum class associated with the provided 4GL OO class name.
|
static <T extends LegacyEnum> |
findClass(java.lang.String cname,
java.lang.Runnable unknown,
java.util.function.Consumer<java.lang.String> noFind)
Return the enum class associated with the provided 4GL OO class name.
|
static void |
generateFailedToFindEnumType(java.lang.String type)
Generate the not found error.
|
private static void |
generateInvalidCommaSeparatedName(java.lang.Class<?> cls,
java.lang.String ename)
Generate the comma-separated name list error for non-flags enums.
|
private static void |
generateInvalidTypeTO()
Generate the invalid type error for ToObject.
|
protected static void |
generateInvalidValue(java.lang.Class<?> cls,
java.lang.String meth)
Generate the invalid value error (15246) for an enum method call.
|
protected static void |
generateInvalidValue(java.lang.String cname,
java.lang.String meth)
Generate the invalid value error (15246) for an enum method call.
|
private static void |
generateInvalidValueGE(java.lang.Class<?> cls)
Generate the invalid value error for getEnum.
|
private static void |
generateInvalidValueTO(java.lang.Class<?> cls)
Generate the invalid value error for ToObject.
|
private static void |
generateNotFoundName(java.lang.Class<?> cls,
java.lang.String ename)
Generate the not found error for a name lookup.
|
protected static void |
generateNotFoundValue(java.lang.Class<?> cls,
long value)
Generate the not found error for a value lookup.
|
private static <T extends LegacyEnum> |
getECR(java.lang.Class<T> cls)
Obtain the enum control record for the given enum class.
|
protected static <T extends LegacyEnum> |
getEnum(java.lang.Class<T> cls,
character name)
Return the enum instance of the given type which is associated with the provided value.
|
protected static <T extends LegacyEnum> |
getEnum(java.lang.Class<T> cls,
int64 value)
Return the enum instance of the given type which is associated with the provided value.
|
static <T extends LegacyEnum> |
getEnumName(java.lang.Class<T> cls,
int64 value)
Obtain the name of the enum(s) specified by this value.
|
static <T extends LegacyEnum> |
getEnumNames(java.lang.Class<T> cls)
Returns a comma-separated text list of the names of all predefined enums in this legacy class, in
the order of their values.
|
protected static <T extends LegacyEnum> |
getEnumsDefineOrder(java.lang.Class<T> cls)
Obtains a list of all predefined enums for the given enum type, in the order of their definition.
|
protected static <T extends LegacyEnum> |
getEnumsDefineOrder(LegacyEnum.EnumControlRecord<T> ecr)
Obtains a list of all predefined enums for the given enum type, in the order of their definition.
|
protected static <T extends LegacyEnum> |
getEnumsValueSort(LegacyEnum.EnumControlRecord<T> ecr)
Obtains a list of all predefined enums for the given enum type, in the order of their values.
|
static <T extends LegacyEnum> |
getEnumValue(java.lang.Class<T> cls,
character name)
Obtain the value of the named enum.
|
static <T extends LegacyEnum> |
getEnumValues(java.lang.Class<T> cls)
Returns a comma-separated text list of the values of all predefined enums in this legacy class, in
the order of their values.
|
protected static <T extends LegacyEnum> |
getExisting(java.lang.Class<T> cls,
long value)
Return an existing instance if it exists with the exact value provided, otherwise create a new
instance and return it.
|
object<? extends _BaseObject_> |
getNextSibling()
Obtains the next object instance in the linked list of all existing objects.
|
object<? extends _BaseObject_> |
getPrevSibling()
Obtains the previous object instance in the linked list of all existing objects.
|
int64 |
getValue()
Returns the 64-bit value of the enum.
|
int |
hashCode()
Calculates a hash code using the instance's value.
|
private static int |
highestSetBit(long value)
Detect which is the highest bit set in the given value (the most significant bit is
on the left and is bit number 63, while the least significant bit is on the right and
is bit 0).
|
boolean |
isTracked()
Reports if the given instance is managed as part of the legacy 4GL object life cycle.
|
logical |
legacyEquals(object<? extends _BaseObject_> other)
Check if this reference matches the given one.
|
protected static <E extends LegacyEnum> |
lookupNameWorker(LegacyEnum.EnumControlRecord<E> ecr,
java.lang.String name)
Return the enum instance of the given type which is associated with the provided name.
|
protected static <E extends LegacyEnum> |
lookupNameWorkerSafe(LegacyEnum.EnumControlRecord<E> ecr,
java.lang.String name,
boolean trim)
Return the enum instance of the given type which is associated with the provided name.
|
protected static <E extends LegacyEnum> |
lookupValueWorker(LegacyEnum.EnumControlRecord<E> ecr,
long value)
Return the enum instance of the given type which is associated with an exact match to the provided
value.
|
protected static <E extends LegacyEnum> |
lookupValueWorkerSafe(LegacyEnum.EnumControlRecord<E> ecr,
long value)
Return the enum instance of the given type which is associated with an exact match to the provided
value.
|
static <T extends LegacyEnum> |
lookupWorker(java.lang.Class<T> cls,
character name,
java.util.function.Consumer<java.lang.Class<?>> unk)
Return the enum instance of the given type which is associated with the provided name.
|
static <T extends LegacyEnum> |
lookupWorker(java.lang.Class<T> cls,
int64 value,
java.util.function.Consumer<java.lang.Class<?>> unk)
Return the enum instance of the given type which is associated with the provided value.
|
protected static <T extends LegacyEnum> |
maximalBitfield(java.lang.Class<T> cls)
Obtains a maximal bitfield for the given enum type.
|
private static long |
nextPowerOf2(java.lang.String name,
long value)
Calculate the next higher power of 2 over the given value.
|
protected static <T extends LegacyEnum> |
registerEnum(java.lang.Class<T> cls,
java.util.function.BiFunction<java.lang.String,java.lang.Long,T> create,
java.util.function.BiFunction<LegacyEnum.EnumControlRecord<T>,java.lang.String,T> lookupName,
LegacyEnum.NameLookupHelper<T> lookupNameSafe,
java.util.function.BiFunction<LegacyEnum.EnumControlRecord<T>,java.lang.Long,T> lookupValue,
java.util.function.BiFunction<LegacyEnum.EnumControlRecord<T>,java.lang.Long,T> lookupValueSafe,
LegacyEnum.EnumInitializer<T> initHelper,
java.util.Comparator<LegacyEnum> valueSort,
java.lang.String legacyName)
Register this enum.
|
protected static <T extends LegacyEnum> |
registerEnum(java.lang.Class<T> cls,
java.util.function.BiFunction<java.lang.String,java.lang.Long,T> create,
java.lang.String legacyName)
Register this enum.
|
character |
toLegacyString()
Get the string representation for this instance.
|
static <T extends LegacyEnum> |
toObject(character cname,
character name)
Return the enum instance of the given type which is associated with the provided name.
|
static <T extends LegacyEnum> |
toObject(character cname,
int64 value)
Return the enum instance of the given type which is associated with the provided value.
|
__lang_BaseObject_constructor__, __lang_BaseObject_execute__, assertNotNull, assertNotNull, clone, getLegacyClass
private static final java.util.Map<java.lang.Class<?>,LegacyEnum.EnumControlRecord> registry
private static final java.lang.String TO_SPEC
protected final java.lang.String name
protected final long value
private java.lang.String symname
protected LegacyEnum(java.lang.String name, long value)
name
- The case-preserved legacy name for the enum.value
- The 64-bit enum value.public static <T extends LegacyEnum> object<T> toObject(character cname, character name)
T
- The enum type.cname
- The name of the enum class to process. Must not be null
or unknown.name
- The name of the enum to return. If the enum type is a flags enum, the value may
be a comma-separated list of enum names to return as a multi-bit enum. Comma
separated lists cannot be used with regular enums. Must not be null
or
unknown.java.lang.IllegalStateException
- If the enum is not yet registered or the class is not a valid enum.public static <T extends LegacyEnum> object<T> toObject(character cname, int64 value)
T
- The enum type.cname
- The name of the enum class to process. Must not be null
or unknown.value
- The value of the enum to return. Must not be null
or unknown.java.lang.IllegalStateException
- If the enum is not yet registered or the class is not a valid enum.public static <T extends LegacyEnum> java.lang.Class<T> findClass(character cname, java.lang.Runnable unknown, java.util.function.Consumer<java.lang.String> noFind)
T
- The enum type.cname
- The 4GL name of the enum class to find. Must not be null
or unknown.unknown
- Error generator method for an unknown name.noFind
- Error generator method for an enum that was not found.public static <T extends LegacyEnum> java.lang.Class<T> findClass(java.lang.String cname, java.lang.Runnable unknown, java.util.function.Consumer<java.lang.String> noFind)
T
- The enum type.cname
- The 4GL name of the enum class to find. Must not be null
or unknown.unknown
- Error generator method for an unknown name.noFind
- Error generator method for an enum that was not found.public static <T extends LegacyEnum> object<T> lookupWorker(java.lang.Class<T> cls, character name, java.util.function.Consumer<java.lang.Class<?>> unk)
T
- The enum type.cls
- The enum class to process. Must not be null
.name
- The name of the enum to return. If the enum type is a flags enum, the value may
be a comma-separated list of enum names to return as a multi-bit enum. Comma
separated lists cannot be used with regular enums. Must not be null
or
unknown.unk
- Error generator method for an unknown name.java.lang.IllegalStateException
- If the enum is not yet registered or the class is not a valid enum.public static <T extends LegacyEnum> object<T> lookupWorker(java.lang.Class<T> cls, int64 value, java.util.function.Consumer<java.lang.Class<?>> unk)
T
- The enum type.cls
- The enum class to process. Must not be null
.value
- The value of the enum to return. Must not be null
or unknown.unk
- Error generator method for an unknown name.java.lang.IllegalStateException
- If the enum is not yet registered or the class is not a valid enum.public static void generateFailedToFindEnumType(java.lang.String type)
type
- Enum type name which was not found.public static boolean failEnumInstantiation(java.lang.Class<?> cls)
cls
- The class which needs to be checked.true
if this was an attempt to instantiate an enum.public static <T extends LegacyEnum> character getEnumValues(java.lang.Class<T> cls)
T
- The enum type.cls
- The enum class to process. Must not be null
.ErrorConditionException
- When called for a class that is not a subclass of LegacyEnum
or FlagsEnum
.public static <T extends LegacyEnum> character getEnumNames(java.lang.Class<T> cls)
T
- The enum type.cls
- The enum class to process. Must not be null
.ErrorConditionException
- When called for a class that is not a subclass of LegacyEnum
or FlagsEnum
.public static <T extends LegacyEnum> int64 getEnumValue(java.lang.Class<T> cls, character name)
T
- The enum type.cls
- The enum class to process. Must not be null
.name
- The enum name to lookup.ErrorConditionException
- If the given name is unknown value.public static <T extends LegacyEnum> character getEnumName(java.lang.Class<T> cls, int64 value)
isFlagSet
). If there is no exact
match or for flag enums there is no single enum that is a subset, then unknown value is returned.
If multiple enums match (flag enums case), then each of the names will be returned in a comma-separated list.
T
- The enum type.cls
- The enum class to process. Must not be null
.value
- The enum value to lookup.ErrorConditionException
- If the given input value is the unknown value.public int64 getValue()
public long _getValue()
public int compareTo(LegacyEnum enm)
Comparable
interface.
The algorithm will fail to give meaningful results in the case where one tries to sort against other objects that do not represent compatible values. In the 4GL, only enum instances of the same exact type are allowed. This method enforces that rule.
This implementation is consistent with equals
and hashCode
.
compareTo
in interface java.lang.Comparable<LegacyEnum>
enm
- The instance to compare against.enm
.public boolean equals(java.lang.Object obj)
compareTo
and hashCode
, which means these instances are safe for usage as a key
in an associative collection.equals
in class java.lang.Object
obj
- The instance to compare against.true
if the objects compare equivalently; false
if they do not, or if the
parameter is not a LegacyEnum
instance of the same subclass type.public int hashCode()
equals
, so it is usable for Java's associative collections. It ignores the name
of the enum in this calculation (which is how equals
is implemented as well).hashCode
in class java.lang.Object
public integer compareTo(object<? extends LegacyEnum> that)
This is the replacement for the 4GL Progress.Lang.Enum:CompareTo
method. It is NOT an
implementation of Comparable
.
that
- The enum instance to compare against.public logical legacyEquals(object<? extends _BaseObject_> other)
legacyEquals
in interface _BaseObject_
legacyEquals
in class BaseObject
other
- The other reference.true
if the other reference is not unknown value and if the reference
is the same as this object's reference.public character toLegacyString()
Although the original method name is toString()
, this version returns a
character
type which would conflict with the java.lang.Object.toString()
version. For this reason, the name is mapped differently during conversion.
toLegacyString
in interface _BaseObject_
toLegacyString
in class BaseObject
public object<? extends _BaseObject_> getNextSibling()
getNextSibling
in interface _BaseObject_
getNextSibling
in class BaseObject
unknown
.public object<? extends _BaseObject_> getPrevSibling()
getPrevSibling
in interface _BaseObject_
getPrevSibling
in class BaseObject
unknown
.public boolean isTracked()
isTracked
in interface _BaseObject_
false
because enums exist outside of the OO 4GL life cycle
mechanisms.public int compareWorker(LegacyEnum that)
that
- The enum instance to compare against.protected static <T extends LegacyEnum> object<T> getEnum(java.lang.Class<T> cls, character name)
T
- The enum type.cls
- The enum class to process. Must not be null
.name
- The name of the enum to return. If the enum type is a flags enum, the value may
be a comma-separated list of enum names to return as a multi-bit enum. Comma
separated lists cannot be used with regular enums. Must not be null
or
unknown.java.lang.IllegalStateException
- If the enum is not yet registered or the class is not a valid enum.protected static <T extends LegacyEnum> object<T> getEnum(java.lang.Class<T> cls, int64 value)
T
- The enum type.cls
- The enum class to process. Must not be null
.value
- The value of the enum to return. Must not be null
or unknown.java.lang.IllegalStateException
- If the enum is not yet registered or the class is not a valid enum.protected static <E extends LegacyEnum> E lookupNameWorker(LegacyEnum.EnumControlRecord<E> ecr, java.lang.String name)
E
- The enum type.ecr
- The enum control record for the enum to be processed. Must not be null
.name
- The name of a single enum to return. This will process an exact match only. This
MUST NOT be a comma-separated list of enum names even if the enum to process is a
flag enum. Must not be null
.protected static <E extends LegacyEnum> E lookupNameWorkerSafe(LegacyEnum.EnumControlRecord<E> ecr, java.lang.String name, boolean trim)
null
.E
- The enum type.ecr
- The enum control record for the enum to be processed. Must not be null
.name
- The name of a single enum to return. This will process an exact match only. This
MUST NOT be a comma-separated list of enum names even if the enum to process is a
flag enum. Must not be null
.trim
- true
to trim leading/trailing whitespace in the name before searching.null
if there is no match.protected static <E extends LegacyEnum> E lookupValueWorker(LegacyEnum.EnumControlRecord<E> ecr, long value)
E
- The enum type.ecr
- The enum control record for the enum to process. Must not be null
.value
- The value of the enum to return. Only exact matches are considered.protected static <E extends LegacyEnum> E lookupValueWorkerSafe(LegacyEnum.EnumControlRecord<E> ecr, long value)
E
- The enum type.ecr
- The enum control record for the enum to process. Must not be null
.value
- The value of the enum to return. Only exact matches are considered.null
if there is no match.protected static <T extends LegacyEnum> T getExisting(java.lang.Class<T> cls, long value)
T
- The enum type.cls
- The enum class to process. Must not be null
.value
- The value of the enum to return.java.lang.IllegalStateException
- If the enum is not yet registered or the class is not a valid enum.protected static <T extends LegacyEnum> T createWorker(java.lang.Class<T> cls, java.lang.String name, long value)
T
- The enum type.cls
- The enum class to process. Must not be null
.name
- The name of the enum.value
- The value of the enum.java.lang.IllegalStateException
- If the enum is not yet registered or the class is not a valid enum.protected static <T extends LegacyEnum> java.util.List<T> getEnumsValueSort(LegacyEnum.EnumControlRecord<T> ecr)
T
- The enum type.ecr
- The enum control record.java.lang.IllegalStateException
- If the enum is not yet registered or the class is not a valid enum.protected static <T extends LegacyEnum> java.util.List<T> getEnumsDefineOrder(java.lang.Class<T> cls)
T
- The enum type.cls
- The enum class being processed.java.lang.IllegalStateException
- If the enum is not yet registered or the class is not a valid enum.protected static <T extends LegacyEnum> java.util.List<T> getEnumsDefineOrder(LegacyEnum.EnumControlRecord<T> ecr)
T
- The enum type.ecr
- The enum control record.protected static <T extends LegacyEnum> long maximalBitfield(java.lang.Class<T> cls)
T
- The enum type.cls
- The enum class to process.java.lang.IllegalStateException
- If the enum is not yet registered or the class is not a valid enum.protected static <T extends LegacyEnum> object<T> createEnum(java.lang.Class<T> cls, java.lang.String name)
T
- The enum type.cls
- The enum class.name
- The enum legacy name.java.lang.IllegalStateException
- If the enum is not yet registered or the class is not a valid enum.protected static <T extends LegacyEnum> object<T> createEnum(java.lang.Class<T> cls, java.lang.String name, java.lang.String alias)
T
- The enum type.cls
- The enum class.name
- The enum legacy name.alias
- The source of the enum's value. Must be previously defined.java.lang.IllegalStateException
- If the enum is not yet registered, the class is not a valid enum or the alias is
unknown.protected static <T extends LegacyEnum> object<T> createEnum(java.lang.Class<T> cls, java.lang.String name, long value)
T
- The enum type.cls
- The enum class.name
- The enum legacy name.value
- The enum value.java.lang.IllegalStateException
- If the enum is not yet registered or the class is not a valid enum.protected static <T extends LegacyEnum> void registerEnum(java.lang.Class<T> cls, java.util.function.BiFunction<java.lang.String,java.lang.Long,T> create, java.lang.String legacyName)
T
- The enum type.cls
- The enum class.create
- Lambda for creation of new instances.legacyName
- The legacy, fully qualified, name.protected static <T extends LegacyEnum> void registerEnum(java.lang.Class<T> cls, java.util.function.BiFunction<java.lang.String,java.lang.Long,T> create, java.util.function.BiFunction<LegacyEnum.EnumControlRecord<T>,java.lang.String,T> lookupName, LegacyEnum.NameLookupHelper<T> lookupNameSafe, java.util.function.BiFunction<LegacyEnum.EnumControlRecord<T>,java.lang.Long,T> lookupValue, java.util.function.BiFunction<LegacyEnum.EnumControlRecord<T>,java.lang.Long,T> lookupValueSafe, LegacyEnum.EnumInitializer<T> initHelper, java.util.Comparator<LegacyEnum> valueSort, java.lang.String legacyName)
T
- The enum type.cls
- The enum class.create
- Lambda for creation of new instances.lookupName
- Lambda for lookup of enums by name.lookupNameSafe
- Lambda for lookup of enums by name, without raising an error.lookupValue
- Lambda for lookup of enums by value.lookupValueSafe
- Lambda for lookup of enums by value, without raising an error.initHelper
- Initializer helper.valueSort
- Sorts enums by value.legacyName
- The legacy, fully qualified, name.protected static void generateNotFoundValue(java.lang.Class<?> cls, long value)
cls
- The enum for which the value is invalid.value
- Enum instance value which cannot be found.protected static void generateInvalidValue(java.lang.Class<?> cls, java.lang.String meth)
cls
- The enum for which the value is invalid.meth
- Method name which had the failure.protected static void generateInvalidValue(java.lang.String cname, java.lang.String meth)
cname
- The legacy class name for which the value is invalid.meth
- Method name which had the failure.protected static java.lang.String dumpEnums(java.util.Collection<LegacyEnum> list)
list
- The list of enums to dump. Must NOT be null
.protected static java.lang.String dumpEnum(LegacyEnum en)
en
- The enum to dump. Must NOT be null
.private static <T extends LegacyEnum> LegacyEnum.EnumControlRecord getECR(java.lang.Class<T> cls)
T
- The enum type.cls
- Enum class.java.lang.IllegalStateException
- If the enum is not yet registered or the class is not a valid enum.private static <T extends LegacyEnum> object<T> createEnumWorker(LegacyEnum.EnumControlRecord<T> ecr, java.lang.String name, long value, T pattern)
T
- The enum type.ecr
- The enum control record.name
- The enum legacy name.value
- The enum value.pattern
- An enum from which some state is patterned.private static long nextPowerOf2(java.lang.String name, long value)
name
- The name of the enum member being created.value
- The number to process.private static int highestSetBit(long value)
value
- The bitfield to process.java.lang.IllegalArgumentException
- If the given value is zero.private static int compareValues(LegacyEnum e1, LegacyEnum e2)
e1
- First enum.e2
- Second enum.private static boolean checkTypes(java.lang.Object o1, java.lang.Object o2)
o1
- Object instance 1.o2
- Object instance 2.true
if the classes of each object are identical.ErrorConditionException
- If the types are different.private static void generateInvalidTypeTO()
ErrorConditionException
- Always.private static void generateInvalidValueTO(java.lang.Class<?> cls)
cls
- The enum for which the value is invalid.ErrorConditionException
- Always.private static void generateInvalidValueGE(java.lang.Class<?> cls)
cls
- The enum for which the value is invalid.ErrorConditionException
- Always.private static void generateNotFoundName(java.lang.Class<?> cls, java.lang.String ename)
cls
- The enum for which the value is invalid.ename
- Enum instance name which cannot be found.ErrorConditionException
- Always.private static void generateInvalidCommaSeparatedName(java.lang.Class<?> cls, java.lang.String ename)
cls
- The enum for which the value is invalid.ename
- Comma-separated name list which was invalid.ErrorConditionException
- Always.