Class ObjectNodeConvertibleValues<V>

  • Type Parameters:
    V - The generic type for values
    All Implemented Interfaces:
    io.micronaut.core.convert.value.ConvertibleValues<V>, io.micronaut.core.value.ValueResolver<java.lang.CharSequence>, java.lang.Iterable<java.util.Map.Entry<java.lang.String,​V>>

    @Internal
    public class ObjectNodeConvertibleValues<V>
    extends java.lang.Object
    implements io.micronaut.core.convert.value.ConvertibleValues<V>
    Simple facade over a Jackson ObjectNode to make it a ConvertibleValues.
    Since:
    1.0
    • Field Summary

      • Fields inherited from interface io.micronaut.core.convert.value.ConvertibleValues

        EMPTY
    • Constructor Summary

      Constructors 
      Constructor Description
      ObjectNodeConvertibleValues​(com.fasterxml.jackson.databind.node.ObjectNode objectNode, io.micronaut.core.convert.ConversionService<?> conversionService)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> java.util.Optional<T> get​(java.lang.CharSequence name, io.micronaut.core.convert.ArgumentConversionContext<T> conversionContext)  
      java.util.Set<java.lang.String> names()  
      java.util.Collection<V> values()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.micronaut.core.convert.value.ConvertibleValues

        asMap, asMap, asProperties, contains, forEach, getValue, getValueType, isEmpty, iterator, subMap, subMap, subMap
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
      • Methods inherited from interface io.micronaut.core.value.ValueResolver

        get, get, get
    • Constructor Detail

      • ObjectNodeConvertibleValues

        public ObjectNodeConvertibleValues​(com.fasterxml.jackson.databind.node.ObjectNode objectNode,
                                           io.micronaut.core.convert.ConversionService<?> conversionService)
        Parameters:
        objectNode - The node that maps to JSON object structure
        conversionService - To convert the JSON node into given type
    • Method Detail

      • names

        public java.util.Set<java.lang.String> names()
        Specified by:
        names in interface io.micronaut.core.convert.value.ConvertibleValues<V>
      • values

        public java.util.Collection<V> values()
        Specified by:
        values in interface io.micronaut.core.convert.value.ConvertibleValues<V>
      • get

        public <T> java.util.Optional<T> get​(java.lang.CharSequence name,
                                             io.micronaut.core.convert.ArgumentConversionContext<T> conversionContext)
        Specified by:
        get in interface io.micronaut.core.value.ValueResolver<V>