java.lang.Object
org.microbean.loader.spi.AbstractProvider
org.microbean.loader.spi.AbstractTreeBasedProvider<TreeNode>
org.microbean.loader.jackson.JacksonProvider
- All Implemented Interfaces:
Provider
- Direct Known Subclasses:
InputStreamJacksonProvider
A partial
AbstractTreeBasedProvider
implementation backed
by Jackson.- Author:
- Laird Nelson
-
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a newJacksonProvider
.protected
JacksonProvider
(Type lowerBound) Creates a newJacksonProvider
. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
final TreeNode
final TreeNode
final boolean
final boolean
final boolean
protected abstract ObjectCodec
objectCodec
(Loader<?> requestor, Path<? extends Type> absolutePath) Returns anObjectCodec
suitable for the combination of the suppliedLoader
andPath
, ornull
if there is no suchObjectCodec
.protected TreeNode
qualifiers
(TreeNode node) protected BiFunction<? super TreeNode,
? super Type, ?> final int
Methods inherited from class org.microbean.loader.spi.AbstractTreeBasedProvider
container, find, path, path, qualifiers, rootNode
Methods inherited from class org.microbean.loader.spi.AbstractProvider
get, lowerBound
-
Constructor Details
-
JacksonProvider
protected JacksonProvider()Creates a newJacksonProvider
.- See Also:
-
JacksonProvider
Creates a newJacksonProvider
.- Parameters:
lowerBound
- the lower type bound of thisJacksonProvider
implementation; may benull
-
-
Method Details
-
size
- Specified by:
size
in classAbstractTreeBasedProvider<TreeNode>
-
names
- Specified by:
names
in classAbstractTreeBasedProvider<TreeNode>
-
get
- Specified by:
get
in classAbstractTreeBasedProvider<TreeNode>
-
get
- Specified by:
get
in classAbstractTreeBasedProvider<TreeNode>
-
absent
- Specified by:
absent
in classAbstractTreeBasedProvider<TreeNode>
-
nil
- Specified by:
nil
in classAbstractTreeBasedProvider<TreeNode>
-
map
- Specified by:
map
in classAbstractTreeBasedProvider<TreeNode>
-
list
- Specified by:
list
in classAbstractTreeBasedProvider<TreeNode>
-
qualifiers
- Specified by:
qualifiers
in classAbstractTreeBasedProvider<TreeNode>
-
objectCodec
Returns anObjectCodec
suitable for the combination of the suppliedLoader
andPath
, ornull
if there is no suchObjectCodec
.This method is called by the
AbstractProvider.get(Loader, Path)
method in the normal course of events.- Parameters:
requestor
- theLoader
seeking aValue
; must not benull
absolutePath
- an absolutePath
for which the suppliedLoader
is seeking a value; must not benull
- Returns:
- an
ObjectCodec
suitable for the combination of the suppliedLoader
andPath
, ornull
- Idempotency:
- Implementations of this method must be idempotent, but not necessarily deterministic.
- Nullability:
- Implementations of this method may return
null
. - Thread Safety:
- Implementations of this method must be safe for concurrent use by multiple threads.
-
reader
protected BiFunction<? super TreeNode,? super Type, reader?> (Loader<?> requestor, Path<? extends Type> absolutePath) - Specified by:
reader
in classAbstractTreeBasedProvider<TreeNode>
-