@Target(value={METHOD,FIELD,PARAMETER}) @Retention(value=RUNTIME) @InjectAnnotation public @interface EnumValue
Enum
.
The annotated Java class member is expected to be an enum type. It can also be an array, a Collection
,
a List
, or a Set
of enum constants.
The source value for an enum constant is extracted from the current resource's ValueMap
in the same
manner that the injector for the standard ValueMapValue
would do. The value map value taken in the string
form is compared to enum constants' name()
values, then to the return values of enum constants'
toString()
methods. It can also be compared to the return value of a specified arbitrary enum method or a
public enum field. The comparison is case-insensitive
Modifier and Type | Optional Element and Description |
---|---|
String |
name
Used to specify the name or path of the value map parameter if it differs from the name of the underlying Java
class member
|
String |
valueMember
Used to specify the name of an enum object member (a method or a public field) used to match an enum constant to
a string-typed value map value.
|
public abstract String name
public abstract String valueMember
name()
method and then the return value of the toString()
methodCopyright © 2024 Exadel, Inc.. All rights reserved.