Syntax

	enumName($enum)

Description

Returns the serialized name of the Java enum constant enum. The serialized name is the name used in configuration files (XML, JSON). For regular Java enums this is the Java constant name. For enums implementing ExternallyNamed or annotated with @Name, the serialized name may differ from the Java constant name.

Parameters

Name Type Description Mandatory Default
enum Enum The Java enum constant whose serialized name is to be determined. yes

Return value

Type: String

The serialized name of the enum constant enum.

Examples

Get the serialized name of an enum constant

enumName(resolveEnum("com.top_logic.basic.config.MapOperation", "add"))

Output: "add"

The serialized name of the MapOperation.ADD constant.