- All Implemented Interfaces:
Decoder<Object,,Object> PrimitiveDecoder<Object>,SplittableDecoder<Object,,Object> SplittablePrimitiveDecoder<Object>
Object to object Decoder implementation.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TDecodes the specified value to an object whose type is represented by the specified class.<T> TDecodes the specified value to an object of the specified type.decodeBigDecimal(Object value) Decodes to big decimal.decodeBigInteger(Object value) Decodes to big integer.decodeBoolean(Object value) Decodes to boolean.decodeByte(Object value) Decodes to byte.decodeCharacter(Object value) Decodes to character.<T> Class<T> decodeClass(Object value) Decodes to class.decodeCurrency(Object value) Decodes to currency.decodeDouble(Object value) Decodes to double.decodeFile(Object value) Decodes to file.decodeFloat(Object value) Decodes to float.decodeInetAddress(Object value) Decodes to inet address.decodeInetSocketAddress(Object value) Decodes to inet socket address.decodeInteger(Object value) Decodes to integer.decodeLocalDate(Object value) Decodes to local date.decodeLocalDateTime(Object value) Decodes to local datetime.decodeLocale(Object value) Decodes to locale.decodeLong(Object value) Decodes to long.decodePath(Object value) Decodes to path.decodePattern(Object value) Decodes to pattern.decodeShort(Object value) Decodes to short.decodeString(Object value) Decodes to string.<T> T[]decodeToArray(Object value, Class<T> type) Decodes the specified value whose type is represented by the specified class to an array of decoded values.<T> T[]decodeToArray(Object value, Type type) Decodes the specified value whose type is the specified type to an array of decoded values.<T> List<T> decodeToList(Object value, Class<T> type) Decodes the specified value whose type is represented by the specified class to a list of decoded values.<T> List<T> decodeToList(Object value, Type type) Decodes the specified value whose type is the specified type to a list of decoded values.<T> Set<T> decodeToSet(Object value, Class<T> type) Decodes the specified value whose type is represented by the specified class to a set of decoded values.<T> Set<T> decodeToSet(Object value, Type type) Decodes the specified value whose type is the specified type to a set of decoded values.Decodes to URI.Decodes to URL.decodeZonedDateTime(Object value) Decodes to zoned datetime.
-
Constructor Details
-
ObjectDecoder
public ObjectDecoder()Creates a new Object decoder.
-
-
Method Details
-
decode
Description copied from interface:DecoderDecodes the specified value to an object whose type is represented by the specified class.
-
decode
Description copied from interface:DecoderDecodes the specified value to an object of the specified type.
- Specified by:
decodein interfaceDecoder<Object,Object> - Type Parameters:
T- the type of the decoded object- Parameters:
value- the object to decodetype- the type of the decoded object- Returns:
- a decoded object
- Throws:
ConverterException- if there was an error decoding the value
-
decodeToList
Description copied from interface:SplittableDecoderDecodes the specified value whose type is represented by the specified class to a list of decoded values.
- Specified by:
decodeToListin interfaceSplittableDecoder<Object,Object> - Type Parameters:
T- the type of the decoded object- Parameters:
value- the value to decodetype- the class of the decoded object- Returns:
- a list of decoded values
-
decodeToList
Description copied from interface:SplittableDecoderDecodes the specified value whose type is the specified type to a list of decoded values.
- Specified by:
decodeToListin interfaceSplittableDecoder<Object,Object> - Type Parameters:
T- the type of the decoded object- Parameters:
value- the value to decodetype- the type of the decoded object- Returns:
- a list of decoded values
-
decodeToSet
Description copied from interface:SplittableDecoderDecodes the specified value whose type is represented by the specified class to a set of decoded values.
- Specified by:
decodeToSetin interfaceSplittableDecoder<Object,Object> - Type Parameters:
T- the type of the decoded object- Parameters:
value- the value to decodetype- the class of the decoded object- Returns:
- a set of decoded values
-
decodeToSet
Description copied from interface:SplittableDecoderDecodes the specified value whose type is the specified type to a set of decoded values.
- Specified by:
decodeToSetin interfaceSplittableDecoder<Object,Object> - Type Parameters:
T- the type of the decoded object- Parameters:
value- the value to decodetype- the type of the decoded object- Returns:
- a set of decoded values
-
decodeToArray
Description copied from interface:SplittableDecoderDecodes the specified value whose type is represented by the specified class to an array of decoded values.
- Specified by:
decodeToArrayin interfaceSplittableDecoder<Object,Object> - Type Parameters:
T- the type of the decoded object- Parameters:
value- the value to decodetype- the class of the decoded object- Returns:
- an array of decoded values
-
decodeToArray
Description copied from interface:SplittableDecoderDecodes the specified value whose type is the specified type to an array of decoded values.
- Specified by:
decodeToArrayin interfaceSplittableDecoder<Object,Object> - Type Parameters:
T- the type of the decoded object- Parameters:
value- the value to decodetype- the type of the decoded object- Returns:
- an array of decoded values
-
decodeByte
Description copied from interface:PrimitiveDecoderDecodes to byte.
- Specified by:
decodeBytein interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeShort
Description copied from interface:PrimitiveDecoderDecodes to short.
- Specified by:
decodeShortin interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeInteger
Description copied from interface:PrimitiveDecoderDecodes to integer.
- Specified by:
decodeIntegerin interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeLong
Description copied from interface:PrimitiveDecoderDecodes to long.
- Specified by:
decodeLongin interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeFloat
Description copied from interface:PrimitiveDecoderDecodes to float.
- Specified by:
decodeFloatin interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeDouble
Description copied from interface:PrimitiveDecoderDecodes to double.
- Specified by:
decodeDoublein interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeCharacter
Description copied from interface:PrimitiveDecoderDecodes to character.
- Specified by:
decodeCharacterin interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeBoolean
Description copied from interface:PrimitiveDecoderDecodes to boolean.
- Specified by:
decodeBooleanin interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeString
Description copied from interface:PrimitiveDecoderDecodes to string.
- Specified by:
decodeStringin interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeBigInteger
Description copied from interface:PrimitiveDecoderDecodes to big integer.
- Specified by:
decodeBigIntegerin interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeBigDecimal
Description copied from interface:PrimitiveDecoderDecodes to big decimal.
- Specified by:
decodeBigDecimalin interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeLocalDate
Description copied from interface:PrimitiveDecoderDecodes to local date.
- Specified by:
decodeLocalDatein interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeLocalDateTime
Description copied from interface:PrimitiveDecoderDecodes to local datetime.
- Specified by:
decodeLocalDateTimein interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeZonedDateTime
Description copied from interface:PrimitiveDecoderDecodes to zoned datetime.
- Specified by:
decodeZonedDateTimein interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeCurrency
Description copied from interface:PrimitiveDecoderDecodes to currency.
- Specified by:
decodeCurrencyin interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeLocale
Description copied from interface:PrimitiveDecoderDecodes to locale.
- Specified by:
decodeLocalein interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeFile
Description copied from interface:PrimitiveDecoderDecodes to file.
- Specified by:
decodeFilein interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodePath
Description copied from interface:PrimitiveDecoderDecodes to path.
- Specified by:
decodePathin interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeURI
Description copied from interface:PrimitiveDecoderDecodes to URI.
- Specified by:
decodeURIin interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeURL
Description copied from interface:PrimitiveDecoderDecodes to URL.
- Specified by:
decodeURLin interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodePattern
Description copied from interface:PrimitiveDecoderDecodes to pattern.
- Specified by:
decodePatternin interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeInetAddress
Description copied from interface:PrimitiveDecoderDecodes to inet address.
- Specified by:
decodeInetAddressin interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeInetSocketAddress
Description copied from interface:PrimitiveDecoderDecodes to inet socket address.
- Specified by:
decodeInetSocketAddressin interfacePrimitiveDecoder<Object>- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-
decodeClass
Description copied from interface:PrimitiveDecoderDecodes to class.
- Specified by:
decodeClassin interfacePrimitiveDecoder<Object>- Type Parameters:
T- the target class type- Parameters:
value- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException- if there was an error decoding the value
-