public class EnumAttribute extends ModelElement
EnumType.| Constructor and Description |
|---|
EnumAttribute(EnumType enumType,
String name,
Method getterMethod) |
| Modifier and Type | Method and Description |
|---|---|
protected static LinkedHashMap<String,EnumAttribute> |
createFrom(EnumType enumType,
Class<?> enumClass) |
Class<?> |
getDatatype()
The class for this attribute's values.
|
protected MessagesHelper |
getMessageHelper() |
protected String |
getMessageKey(DocumentationKind messageType) |
Object |
getValue(Object enumInstance)
Returns the value for this attribute from the enum value.
|
Object |
getValue(Object enumInstance,
Locale locale)
Returns the value for this attribute from the enum value.
|
boolean |
isDisplayName()
Whether this attribute is used to display an enum value for human readability.
|
boolean |
isIdentifier()
Whether this attribute is used to identify an enum value.
|
boolean |
isMultilingual()
Whether the values of this attribute are dependent on
Locale. |
boolean |
isUnique()
Whether this attribute's value is unique over all the enum's values.
|
createMessageHelper, getDescription, getDocumentation, getExtensionPropertyIds, getExtensionPropertyValue, getLabel, getName, getRelevantProductObject, invokeField, invokeMethod, toStringpublic Class<?> getDatatype()
public boolean isUnique()
public boolean isIdentifier()
public boolean isDisplayName()
public Object getValue(Object enumInstance)
public boolean isMultilingual()
Locale.public Object getValue(Object enumInstance, Locale locale)
for getting a locale independent valueprotected String getMessageKey(DocumentationKind messageType)
getMessageKey in class ModelElementprotected MessagesHelper getMessageHelper()
getMessageHelper in class ModelElementprotected static LinkedHashMap<String,EnumAttribute> createFrom(EnumType enumType, Class<?> enumClass)
Copyright © 2021. All rights reserved.