Package | Description |
---|---|
org.foxlabs.validation | |
org.foxlabs.validation.converter | |
org.foxlabs.validation.metadata |
Modifier and Type | Method and Description |
---|---|
Converter<V> |
ConstrainedMap.Entry.getConverter()
Returns converter to be used for value conversion into and from
string representation.
|
Modifier and Type | Method and Description |
---|---|
<V> V |
Validator.ContextBuilder.decodeValue(Converter<V> converter,
String value)
Converts string representation of value into object using the
specified converter and predefined custom parameters.
|
protected <V> V |
Validator.Context.decodeValue(Converter<V> converter,
String value) |
<V> V[] |
Validator.ContextBuilder.decodeValues(Converter<V> converter,
String... values)
Converts array of string representations of values into array of
objects using the specified converter and predefined custom
parameters.
|
protected <V> V[] |
Validator.Context.decodeValues(Converter<V> converter,
String... values) |
<V> String |
Validator.ContextBuilder.encodeValue(Converter<V> converter,
V value)
Converts value into string representation using the specified
converter and predefined custom parameters.
|
protected <V> String |
Validator.Context.encodeValue(Converter<V> converter,
V value) |
<V> String[] |
Validator.ContextBuilder.encodeValues(Converter<V> converter,
V... values)
Converts array of values into array of their string representations
using the specified converter and predefined custom parameters.
|
protected <V> String[] |
Validator.Context.encodeValues(Converter<V> converter,
V... values) |
Modifier and Type | Class and Description |
---|---|
class |
AbstractConverter<V>
This class provides base implementation of the
Converter
interface. |
class |
ArrayConverter<V>
This class provides
Converter implementation for all
one-dimensional array types. |
class |
BigDecimalConverter
This class provides
NumberConverter implementation for the
java.math.BigDecimal type. |
class |
BigIntegerConverter
This class provides
NumberConverter implementation for the
java.math.BigInteger type. |
class |
BooleanConverter
This class provides
Converter implementation for the
java.lang.Boolean type. |
class |
ByteConverter
This class provides
NumberConverter implementation for the
java.lang.Byte type. |
class |
CharacterConverter
This class provides
Converter implementation for the
java.lang.Character type. |
class |
ClassConverter
This class provides
Converter implementation for the
java.lang.Class type. |
class |
CollectionConverter<V>
This class provides
Converter implementation for all JDK
java.util.Collection types. |
class |
ConverterMessageWrapper<V>
This class provides ability to override error message of another converter.
|
class |
ConverterWrapper<V>
This class provides convenient implementation of the
Converter
that can be subclassed to wrap another converter. |
class |
CustomConverter<V>
This class provides
Converter implementation for custom
converters. |
class |
DateConverter
This class provides
Converter implementation for the
java.util.Date type. |
class |
DoubleConverter
This class provides
NumberConverter implementation for the
java.lang.Double type. |
class |
EnumConverter<V extends Enum<V>>
This class provides
Converter implementation for all
java.lang.Enum enumeration types. |
class |
FileConverter
This class provides
Converter implementation for the
java.io.File type. |
class |
FloatConverter
This class provides
NumberConverter implementation for the
java.lang.Float type. |
class |
IntegerConverter
This class provides
NumberConverter implementation for the
java.lang.Integer type. |
class |
LocaleConverter
This class provides
Converter implementation for the
java.util.Locale type. |
class |
LogLevelConverter
This class provides
Converter implementation for the
java.util.logging.Level type. |
class |
LongConverter
This class provides
NumberConverter implementation for the
java.lang.Long type. |
class |
MapConverter<K,V>
This class provides
Converter implementation for all JDK
java.util.Map types. |
class |
NumberConverter<V extends Number>
This class provides base
Converter implementation for all
java.lang.Number types. |
static class |
NumberConverter.DecimalType<V extends Number>
This class provides base
NumberConverter implementation for
all decimal types. |
static class |
NumberConverter.IntegerType<V extends Number>
This class provides base
NumberConverter implementation for
all integer types. |
class |
SequenceConverter<V>
This class provides base
Converter implementation for
converters of elements sequence. |
class |
ShortConverter
This class provides
NumberConverter implementation for the
java.lang.Short type. |
class |
SimpleTokenizer
This class provides simple
Tokenizer implementation based on
delimiter characters like java.util.StringTokenizer . |
class |
StringConverter
This class provides
Converter implementation for the
java.lang.String type. |
class |
TimeZoneConverter
This class provides
Converter implementation for the
java.util.TimeZone type. |
class |
Tokenizer
This class provides base
Converter implementation for the
string array type. |
class |
UnsupportedConverter<V>
This class provides
Converter stub for any unsupported type. |
class |
URIConverter
This class provides
Converter implementation for the
java.net.URI type. |
class |
URLConverter
This class provides
Converter implementation for the
java.net.URL type. |
Modifier and Type | Field and Description |
---|---|
protected Converter<V> |
ConverterWrapper.converter
Wrapped converter.
|
Modifier and Type | Method and Description |
---|---|
static <V> Converter<V> |
ConverterFactory.addDefaultConverter(Converter<V> converter)
Registers a new default converter or overrides existing one.
|
static <V> Converter<V> |
ConverterFactory.createConverter(Class<V> type,
String prefix)
Returns converter for the specified value type.
|
static <V> Converter<V> |
ConverterFactory.createConverter(Type type,
Annotation[] annotations,
String namespace)
Creates a new converter for the specified generic value type using
configuration from the specified annotations.
|
static <V> Converter<V[]> |
ConverterFactory.forArray(Converter<V> converter)
Creates a new array converter with the specified converter of array
elements and default tokenizer.
|
static <V> Converter<V[]> |
ConverterFactory.forArray(Converter<V> converter,
String delims)
Creates a new array converter with the specified converter of array
elements and allowed elements delimiters.
|
static <V> Converter<V[]> |
ConverterFactory.forArray(Converter<V> converter,
Tokenizer tokenizer)
Creates a new array converter with the specified converter of array
elements and tokenzier of array elements.
|
static Converter<BigDecimal> |
ConverterFactory.forBigDecimal(String pattern)
Creates a new
java.math.BigDecimal converter with the
specified pattern. |
static Converter<BigInteger> |
ConverterFactory.forBigInteger(String pattern)
Creates a new
java.math.BigInteger converter with the
specified pattern. |
static Converter<Boolean> |
ConverterFactory.forBoolean(Class<Boolean> type,
String prefix)
Creates a new converter for the specified boolean type and prefix.
|
static Converter<Byte> |
ConverterFactory.forByte(String pattern)
Creates a new
java.lang.Byte converter with the specified
pattern. |
static Converter<Class<?>> |
ConverterFactory.forClass(ClassLoader loader)
Creates a new
java.lang.Class converter with the specified
class loader. |
static <T extends Collection<V>,V> |
ConverterFactory.forCollection(Class<? extends Collection> type,
Converter<V> converter)
Creates a new collection converter with the specified collection type,
converter of collection elements and default tokenzier.
|
static <T extends Collection<V>,V> |
ConverterFactory.forCollection(Class<? extends Collection> type,
Converter<V> converter,
String delims)
Creates a new collection converter with the specified collection type,
converter of collection elements and allowed elements delimiters.
|
static <T extends Collection<V>,V> |
ConverterFactory.forCollection(Class<? extends Collection> type,
Converter<V> converter,
Tokenizer tokenizer)
Creates a new collection converter with the specified collection type,
converter of collection elements and tokenzier of collection elements.
|
static Converter<Date> |
ConverterFactory.forDate(int dateStyle,
int timeStyle)
Creates a new
java.util.Date converter with the specified
date and time style. |
static Converter<Date> |
ConverterFactory.forDate(String pattern)
Creates a new
java.util.Date converter with the specified
date/time pattern. |
static Converter<Double> |
ConverterFactory.forDouble(String pattern)
Creates a new
java.lang.Double converter with the specified
pattern. |
static <V extends Enum<V>> |
ConverterFactory.forEnum(Class<V> type)
Creates a new converter for the specified enumeration type.
|
static <V extends Enum<V>> |
ConverterFactory.forEnum(Class<V> type,
String prefix)
Creates a new converter for the specified enumeration type and prefix.
|
static Converter<File> |
ConverterFactory.forFile(String parent)
Creates a new
java.io.File converter with the specified
parent directory pathname. |
static Converter<Float> |
ConverterFactory.forFloat(String pattern)
Creates a new
java.lang.Float converter with the specified
pattern. |
static Converter<Integer> |
ConverterFactory.forInteger(String pattern)
Creates a new
java.lang.Integer converter with the
specified pattern. |
static Converter<Long> |
ConverterFactory.forLong(String pattern)
Creates a new
java.lang.Long converter with the specified
pattern. |
static <T extends Map<K,V>,K,V> |
ConverterFactory.forMap(Class<? extends Map> type,
Converter<K> kconverter,
Converter<V> vconverter)
Creates a new map converter with the specified map type, key and value
converters and default tokenzier.
|
static <T extends Map<K,V>,K,V> |
ConverterFactory.forMap(Class<? extends Map> type,
Converter<K> kconverter,
Converter<V> vconverter,
String delims)
Creates a new map converter with the specified map type, key and value
converters, allowed key-value pairs delimiters.
|
static <T extends Map<K,V>,K,V> |
ConverterFactory.forMap(Class<? extends Map> type,
Converter<K> kconverter,
Converter<V> vconverter,
Tokenizer tokenizer)
Creates a new map converter with the specified map type, key and value
converters, key-value pairs tokenzier.
|
static Converter<Short> |
ConverterFactory.forShort(String pattern)
Creates a new
java.lang.Short converter with the specified
pattern. |
Converter<V> |
ConverterWrapper.getConverter()
Returns wrapped converter.
|
Converter<?> |
MalformedValueException.getConverter()
Returns converter that is source of this exception.
|
static <V> Converter<V> |
ConverterFactory.getDefaultConverter(Class<V> type)
Returns default converter for the specified value type.
|
static <V> Converter<V> |
ConverterFactory.unwrapConverter(Converter<V> converter)
Returns unwrapped converter for the specified one.
|
static <V> Converter<V> |
ConverterFactory.wrapMessage(Converter<V> converter,
String message)
Wraps error message of the specified converter.
|
Modifier and Type | Method and Description |
---|---|
static <V> Converter<V> |
ConverterFactory.addDefaultConverter(Converter<V> converter)
Registers a new default converter or overrides existing one.
|
static <V> Converter<V[]> |
ConverterFactory.forArray(Converter<V> converter)
Creates a new array converter with the specified converter of array
elements and default tokenizer.
|
static <V> Converter<V[]> |
ConverterFactory.forArray(Converter<V> converter,
String delims)
Creates a new array converter with the specified converter of array
elements and allowed elements delimiters.
|
static <V> Converter<V[]> |
ConverterFactory.forArray(Converter<V> converter,
Tokenizer tokenizer)
Creates a new array converter with the specified converter of array
elements and tokenzier of array elements.
|
static <T extends Collection<V>,V> |
ConverterFactory.forCollection(Class<? extends Collection> type,
Converter<V> converter)
Creates a new collection converter with the specified collection type,
converter of collection elements and default tokenzier.
|
static <T extends Collection<V>,V> |
ConverterFactory.forCollection(Class<? extends Collection> type,
Converter<V> converter,
String delims)
Creates a new collection converter with the specified collection type,
converter of collection elements and allowed elements delimiters.
|
static <T extends Collection<V>,V> |
ConverterFactory.forCollection(Class<? extends Collection> type,
Converter<V> converter,
Tokenizer tokenizer)
Creates a new collection converter with the specified collection type,
converter of collection elements and tokenzier of collection elements.
|
static <T extends Map<K,V>,K,V> |
ConverterFactory.forMap(Class<? extends Map> type,
Converter<K> kconverter,
Converter<V> vconverter)
Creates a new map converter with the specified map type, key and value
converters and default tokenzier.
|
static <T extends Map<K,V>,K,V> |
ConverterFactory.forMap(Class<? extends Map> type,
Converter<K> kconverter,
Converter<V> vconverter)
Creates a new map converter with the specified map type, key and value
converters and default tokenzier.
|
static <T extends Map<K,V>,K,V> |
ConverterFactory.forMap(Class<? extends Map> type,
Converter<K> kconverter,
Converter<V> vconverter,
String delims)
Creates a new map converter with the specified map type, key and value
converters, allowed key-value pairs delimiters.
|
static <T extends Map<K,V>,K,V> |
ConverterFactory.forMap(Class<? extends Map> type,
Converter<K> kconverter,
Converter<V> vconverter,
String delims)
Creates a new map converter with the specified map type, key and value
converters, allowed key-value pairs delimiters.
|
static <T extends Map<K,V>,K,V> |
ConverterFactory.forMap(Class<? extends Map> type,
Converter<K> kconverter,
Converter<V> vconverter,
Tokenizer tokenizer)
Creates a new map converter with the specified map type, key and value
converters, key-value pairs tokenzier.
|
static <T extends Map<K,V>,K,V> |
ConverterFactory.forMap(Class<? extends Map> type,
Converter<K> kconverter,
Converter<V> vconverter,
Tokenizer tokenizer)
Creates a new map converter with the specified map type, key and value
converters, key-value pairs tokenzier.
|
static boolean |
ConverterFactory.hasWrappedMessage(Converter<?> converter)
Determines if the specified converter has wrapped error message.
|
static <V> Converter<V> |
ConverterFactory.unwrapConverter(Converter<V> converter)
Returns unwrapped converter for the specified one.
|
static <V> Converter<V> |
ConverterFactory.wrapMessage(Converter<V> converter,
String message)
Wraps error message of the specified converter.
|
Constructor and Description |
---|
ConverterWrapper(Converter<V> converter)
Constructs a new
ConverterWrapper with the specified
converter. |
MalformedValueException(Converter<?> converter,
ValidationContext<?> context,
String value)
Constructs a new
MalformedValueException with the specified
converter, context and invalid value. |
MalformedValueException(Converter<?> converter,
ValidationContext<?> context,
String value,
Throwable cause)
Constructs a new
MalformedValueException with the specified
converter, context, invalid value and cause. |
Modifier and Type | Field and Description |
---|---|
protected Converter<V> |
AbstractPropertyMetaData.converter
Converter to be used for property value conversion into and from string.
|
Modifier and Type | Method and Description |
---|---|
Converter<V> |
PropertyMetaData.getConverter()
Returns converter to be used for property value conversion into and from
string representation.
|
Converter<V> |
AbstractPropertyMetaData.getConverter()
Returns converter to be used for property value conversion into and from
string.
|
Modifier and Type | Method and Description |
---|---|
<V> MetaDataBuilder<T> |
MetaDataBuilder.property(String name,
Converter<V> converter)
Defines a property with the specified name and converter.
|
<V> MetaDataBuilder<T> |
MetaDataBuilder.property(String name,
Converter<V> converter,
Constraint<? super V> constraint)
Defines a property with the specified name, converter and constraint.
|
<V> MapMetaData.Builder |
MapMetaData.Builder.property(String name,
Converter<V> converter,
Constraint<? super V> constraint,
V defaultValue)
Defines a property with the specified name, converter, constraint
and default value.
|
abstract <V> MetaDataBuilder<T> |
MetaDataBuilder.property(String name,
Converter<V> converter,
Constraint<? super V> constraint,
V defaultValue)
Defines a property with the specified name, converter, constraint
and default value.
|
<V> MetaDataBuilder<T> |
MetaDataBuilder.property(String name,
Converter<V> converter,
V defaultValue)
Defines a property with the specified name, converter and default
value.
|
Constructor and Description |
---|
AbstractPropertyMetaData(String name,
Converter<V> converter,
Constraint<? super V> constraint,
V defaultValue)
Constructs a new
AbstractPropertyMetaData with the specified
name, converter, constraint and default value. |
Property(String name,
Converter<V> converter,
Constraint<? super V> constraint,
org.foxlabs.util.reflect.PropertyGetter getter,
org.foxlabs.util.reflect.PropertySetter setter,
V defaultValue)
Constructs a new
BeanPropertyMetaData with the specified
name, converter, constraint, property getter and setter. |
Property(String name,
Converter<V> converter,
Constraint<? super V> constraint,
V defaultValue)
Constructs a new
MapMetaData.Property with the
specified name, converter, constraint and default value. |
Copyright © 2011–2020 FoxLabs. All rights reserved.