public interface EnumerationMapper
Install4JBeanInfo.setEnumerationMappers(EnumerationMapper[])
.
In the install4j GUI, an enumerated property will be displayed with the enumeration entry name that corresponds to the
object value of the property and the user can choose a value from a drop-down list.
In concept, this class is similar to the PropertyConverter
class.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_CONTEXT
A default context that you can use in the
getContext() method if there is only one
enumeration mapper for the property type returned bygetEnumerationClass() } |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContext()
The property descriptor of an enumerated property must have a non-null context that corresponds to the
return value of this method.
|
java.lang.Class |
getEnumerationClass()
Return the property type for which this enumeration mapper is eligible.
|
EnumerationMapEntry[] |
getEnumerationMapEntries()
Defines the enumeration.
|
static final java.lang.String DEFAULT_CONTEXT
getContext()
method if there is only one
enumeration mapper for the property type returned bygetEnumerationClass()
}java.lang.Class getEnumerationClass()
getEnumerationMapEntries()
must be of this type.EnumerationMapEntry[] getEnumerationMapEntries()
java.lang.String getContext()
For classes that do not have default handlers in install4j,
the enumeration mapper will also be used if this method returns DEFAULT_CONTEXT
,
the getEnumerationClass()
method returns the class of the property and the context of the property
is not set. However, it is safer not to rely on that behavior.