Class ConversionAnalyzer

java.lang.Object
com.expediagroup.beans.conversion.analyzer.ConversionAnalyzer

public final class ConversionAnalyzer
extends java.lang.Object
This class provides method for converting a primitive input into another.
  • Constructor Summary

    Constructors
    Constructor Description
    ConversionAnalyzer()
    Default constructor.
  • Method Summary

    Modifier and Type Method Description
    java.util.Optional<java.util.function.Function<java.lang.Object,​java.lang.Object>> getConversionFunction​(java.lang.Class<?> sourceClass, java.lang.Class<?> targetClass)
    Analyzes Fields given as input and returns the conversion processor.

    Methods inherited from class java.lang.Object

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

    • ConversionAnalyzer

      public ConversionAnalyzer()
      Default constructor.
  • Method Details

    • getConversionFunction

      public java.util.Optional<java.util.function.Function<java.lang.Object,​java.lang.Object>> getConversionFunction​(java.lang.Class<?> sourceClass, java.lang.Class<?> targetClass)
      Analyzes Fields given as input and returns the conversion processor.
      Parameters:
      sourceClass - source field class
      targetClass - the destination field class
      Returns:
      an Optional containing the conversion function (if exists)