Class EnumAttribute

    • Constructor Detail

      • EnumAttribute

        public EnumAttribute​(EnumType enumType,
                             java.lang.String name,
                             java.lang.reflect.Method getterMethod)
    • Method Detail

      • getDatatype

        public java.lang.Class<?> getDatatype()
        The class for this attribute's values.
      • isUnique

        public boolean isUnique()
        Whether this attribute's value is unique over all the enum's values.
      • isIdentifier

        public boolean isIdentifier()
        Whether this attribute is used to identify an enum value.
      • isDisplayName

        public boolean isDisplayName()
        Whether this attribute is used to display an enum value for human readability.
      • isMultilingual

        public boolean isMultilingual()
        Whether the values of this attribute are dependent on Locale.
      • getValue

        public java.lang.Object getValue​(java.lang.Object enumInstance,
                                         java.util.Locale locale)
        Returns the value for this attribute from the enum value. If the attribute is multilingual, the given locale is used, otherwise it is ignored.
        See Also:
        for getting a locale independent value
      • createFrom

        protected static java.util.LinkedHashMap<java.lang.String,​EnumAttribute> createFrom​(EnumType enumType,
                                                                                                  java.lang.Class<?> enumClass)