public class StringEnumPropertyHandler extends Object implements PropertyHandler
PropertyHandler
for enums. Will convert strings to enums.Constructor and Description |
---|
StringEnumPropertyHandler() |
Modifier and Type | Method and Description |
---|---|
Object |
apply(Class<?> parameter,
Object value)
Stores the given
value into an instance of type parameter . |
boolean |
match(Class<?> parameter,
Object value)
Tests whether to handle setting
value into an instance of parameter . |
public StringEnumPropertyHandler()
public Object apply(Class<?> parameter, Object value)
PropertyHandler
value
into an instance of type parameter
. This method is only called if PropertyHandler.match(Class, Object)
return true.apply
in interface PropertyHandler
parameter
- The type of the target parameter.value
- The value to set.public boolean match(Class<?> parameter, Object value)
PropertyHandler
value
into an instance of parameter
.match
in interface PropertyHandler
parameter
- The type of the target parameter.value
- The value to be set.Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.