Class MicronautConversionService

  • All Implemented Interfaces:
    io.micronaut.spring.beans.MicronautContextInternal, org.springframework.core.convert.ConversionService

    @Singleton
    @Named("conversionService")
    public class MicronautConversionService
    extends java.lang.Object
    implements org.springframework.core.convert.ConversionService, io.micronaut.spring.beans.MicronautContextInternal
    ConversionService adapter.
    Since:
    1.0
    • Constructor Summary

      Constructors 
      Constructor Description
      MicronautConversionService​(io.micronaut.core.convert.ConversionService<?> conversionService)
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canConvert​(java.lang.Class<?> sourceType, java.lang.Class<?> targetType)  
      boolean canConvert​(org.springframework.core.convert.TypeDescriptor sourceType, org.springframework.core.convert.TypeDescriptor targetType)  
      <T> T convert​(java.lang.Object source, java.lang.Class<T> targetType)  
      java.lang.Object convert​(java.lang.Object source, org.springframework.core.convert.TypeDescriptor sourceType, org.springframework.core.convert.TypeDescriptor targetType)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MicronautConversionService

        public MicronautConversionService​(io.micronaut.core.convert.ConversionService<?> conversionService)
        Default constructor.
        Parameters:
        conversionService - The target service
    • Method Detail

      • canConvert

        public boolean canConvert​(java.lang.Class<?> sourceType,
                                  java.lang.Class<?> targetType)
        Specified by:
        canConvert in interface org.springframework.core.convert.ConversionService
      • canConvert

        public boolean canConvert​(org.springframework.core.convert.TypeDescriptor sourceType,
                                  org.springframework.core.convert.TypeDescriptor targetType)
        Specified by:
        canConvert in interface org.springframework.core.convert.ConversionService
      • convert

        public <T> T convert​(java.lang.Object source,
                             java.lang.Class<T> targetType)
        Specified by:
        convert in interface org.springframework.core.convert.ConversionService
      • convert

        public java.lang.Object convert​(java.lang.Object source,
                                        org.springframework.core.convert.TypeDescriptor sourceType,
                                        org.springframework.core.convert.TypeDescriptor targetType)
        Specified by:
        convert in interface org.springframework.core.convert.ConversionService