Module tools.jackson.databind
Package tools.jackson.databind.deser.jdk
Class JDKFromStringDeserializer.NioPathDeserializer
java.lang.Object
tools.jackson.databind.ValueDeserializer<T>
tools.jackson.databind.deser.std.StdDeserializer<T>
tools.jackson.databind.deser.std.StdScalarDeserializer<T>
tools.jackson.databind.deser.std.FromStringDeserializer<Object>
tools.jackson.databind.deser.jdk.JDKFromStringDeserializer
tools.jackson.databind.deser.jdk.JDKFromStringDeserializer.NioPathDeserializer
- All Implemented Interfaces:
NullValueProvider,ValueInstantiator.Gettable
- Enclosing class:
- JDKFromStringDeserializer
Deserializer for
Path values: separate implementation (and, unlike
other implementations here, public) to allow construction with a
custom set of allowed URI schemes (see [databind#6129]).- Since:
- 3.1.6
-
Nested Class Summary
Nested classes/interfaces inherited from class tools.jackson.databind.deser.jdk.JDKFromStringDeserializer
JDKFromStringDeserializer.NioPathDeserializerNested classes/interfaces inherited from class tools.jackson.databind.ValueDeserializer
ValueDeserializer.None -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Collection<String>URI schemes accepted by this instance; values with no scheme at all are always accepted (and read as local file system paths).static final Collection<String>URI schemes accepted unless overridden: only "file", scheme of the defaultFileSystem.Fields inherited from class tools.jackson.databind.deser.jdk.JDKFromStringDeserializer
_kind, STD_CHARSET, STD_CLASS, STD_CURRENCY, STD_FILE, STD_INET_ADDRESS, STD_INET_SOCKET_ADDRESS, STD_JAVA_TYPE, STD_LOCALE, STD_PATH, STD_PATTERN, STD_TIME_ZONE, STD_URI, STD_URLFields inherited from class tools.jackson.databind.deser.std.StdDeserializer
_valueClass, _valueType, F_MASK_INT_COERCIONS -
Constructor Summary
ConstructorsConstructorDescriptionNioPathDeserializer(Collection<String> allowedSchemes) Constructor for specifying URI schemes to accept: matching is done case-insensitively, same as byjava.nio.file.Paths.get(URI). -
Method Summary
Modifier and TypeMethodDescription_deserialize(String value, DeserializationContext ctxt) Main method from trying to deserialize actual value from non-empty String.static Pathdeserialize(DeserializationContext ctxt, String value, Collection<String> allowedSchemes) Methods inherited from class tools.jackson.databind.deser.jdk.JDKFromStringDeserializer
_deserializeFromEmptyStringDefault, _firstHyphenOrUnderscore, _inetSocketAddress, _shouldTrim, findDeserializer, getEmptyValue, typesMethods inherited from class tools.jackson.databind.deser.std.FromStringDeserializer
_deserializeEmbedded, _deserializeFromEmptyString, _deserializeFromOther, deserialize, logicalTypeMethods inherited from class tools.jackson.databind.deser.std.StdScalarDeserializer
deserialize, deserializeWithType, getEmptyAccessPattern, getNullAccessPattern, supportsUpdateMethods inherited from class tools.jackson.databind.deser.std.StdDeserializer
_byteOverflow, _checkBooleanToStringCoercion, _checkCoercionFail, _checkDoubleSpecialValue, _checkFloatSpecialValue, _checkFloatToIntCoercion, _checkFloatToStringCoercion, _checkFromStringCoercion, _checkFromStringCoercion, _checkIntToFloatCoercion, _checkIntToStringCoercion, _checkTextualNull, _checkToStringCoercion, _coerceBooleanFromInt, _coercedTypeDesc, _coercedTypeDesc, _coerceIntegral, _deserializeFromArray, _deserializeFromEmptyString, _deserializeFromString, _deserializeFromStringForContainer, _deserializeWrappedValue, _findCoercionFromBlankString, _findCoercionFromEmptyArray, _findCoercionFromEmptyString, _findNullProvider, _hasTextualNull, _intOverflow, _isBlank, _isFalse, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _isTrue, _neitherNull, _nonNullNumber, _parseBoolean, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDouble, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseInteger, _parseInteger, _parseIntPrimitive, _parseIntPrimitive, _parseLong, _parseLong, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _streamReadConstraints, _validateTimestampLength, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _wrapIOFailure, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatFeature, findFormatOverrides, findFormatOverrides, findValueNullProvider, getValueInstantiator, getValueType, getValueType, handledType, handleMissingEndArrayForSingle, handleNestedArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializerMethods inherited from class tools.jackson.databind.ValueDeserializer
createContextual, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getKnownPropertyNames, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, resolve, unwrappingDeserializer
-
Field Details
-
DEFAULT_ALLOWED_SCHEMES
URI schemes accepted unless overridden: only "file", scheme of the defaultFileSystem. -
_allowedSchemes
URI schemes accepted by this instance; values with no scheme at all are always accepted (and read as local file system paths).
-
-
Constructor Details
-
NioPathDeserializer
public NioPathDeserializer() -
NioPathDeserializer
Constructor for specifying URI schemes to accept: matching is done case-insensitively, same as byjava.nio.file.Paths.get(URI).NOTE: for allowed schemes that have no provider installed for the system class loader, look up is also attempted using this thread's context class loader (see [databind#2120]); this is never done for schemes that are not allowed.
- Parameters:
allowedSchemes- URI schemes to accept; must not benull(but may be empty to only accept scheme-less values)
-
-
Method Details
-
_deserialize
public Object _deserialize(String value, DeserializationContext ctxt) throws tools.jackson.core.JacksonException Description copied from class:FromStringDeserializerMain method from trying to deserialize actual value from non-empty String.- Overrides:
_deserializein classJDKFromStringDeserializer- Throws:
tools.jackson.core.JacksonException
-
deserialize
public static Path deserialize(DeserializationContext ctxt, String value, Collection<String> allowedSchemes) throws tools.jackson.core.JacksonException - Throws:
tools.jackson.core.JacksonException
-