Class ObjectNodeConvertibleValues<V>
java.lang.Object
io.micronaut.jackson.databind.convert.ObjectNodeConvertibleValues<V>
- Type Parameters:
V- The generic type for values
- All Implemented Interfaces:
ConversionServiceProvider, ConvertibleValues<V>, ValueResolver<CharSequence>, Iterable<Map.Entry<String,V>>
@Internal
public class ObjectNodeConvertibleValues<V>
extends Object
implements ConvertibleValues<V>
Simple facade over a Jackson
ObjectNode to make it a ConvertibleValues.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
Fields inherited from interface ConvertibleValues
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionObjectNodeConvertibleValues(tools.jackson.databind.node.ObjectNode objectNode, ConversionService conversionService) -
Method Summary
Modifier and TypeMethodDescription<T> Optional<T> get(CharSequence name, ArgumentConversionContext<T> conversionContext) Resolve the given property for the given name.names()values()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ConvertibleValues
asMap, asMap, asProperties, contains, forEach, getConversionService, getValue, getValueType, isEmpty, iterator, subMap, subMap, subMapMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface ValueResolver
get, get, get
-
Constructor Details
-
ObjectNodeConvertibleValues
public ObjectNodeConvertibleValues(tools.jackson.databind.node.ObjectNode objectNode, ConversionService conversionService) - Parameters:
objectNode- The node that maps to JSON object structureconversionService- To convert the JSON node into given type
-
-
Method Details
-
names
- Specified by:
namesin interfaceConvertibleValues<V>- Returns:
- The names of the values
-
values
- Specified by:
valuesin interfaceConvertibleValues<V>- Returns:
- The values
-
get
Description copied from interface:ValueResolverResolve the given property for the given name.- Specified by:
getin interfaceValueResolver<V>- Type Parameters:
T- The concrete type- Parameters:
name- The nameconversionContext- The conversion context- Returns:
- An optional containing the property value if it exists and is able to be converted
-