V
- The unsupported typepublic final class UnsupportedConverter<V> extends AbstractValidation<V> implements Converter<V>
Converter
stub for any unsupported type.Modifier and Type | Method and Description |
---|---|
boolean |
appendMessageArguments(ValidationContext<?> context,
Map<String,Object> arguments)
Appends
type argument that contains unsupported type. |
<T> V |
decode(String value,
ValidationContext<T> context)
Throws
MalformedValueException . |
<T> String |
encode(V value,
ValidationContext<T> context)
Returns
value.toString() if value is not null ;
returns empty string otherwise. |
Class<V> |
getType()
Returns unsupported type.
|
getMessageTemplate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMessageTemplate
public boolean appendMessageArguments(ValidationContext<?> context, Map<String,Object> arguments)
type
argument that contains unsupported type.appendMessageArguments
in interface Converter<V>
appendMessageArguments
in interface Validation<V>
appendMessageArguments
in class AbstractValidation<V>
context
- Validation context.arguments
- Arguments to be substituted into the error message
template.true
.public <T> V decode(String value, ValidationContext<T> context)
MalformedValueException
.decode
in interface Converter<V>
T
- The type of validated entity.value
- String representation of value.context
- Validation context.MalformedValueException
- always.public <T> String encode(V value, ValidationContext<T> context)
value.toString()
if value is not null
;
returns empty string otherwise.Copyright © 2011–2020 FoxLabs. All rights reserved.