Class UnknownType


  • public class UnknownType
    extends java.lang.Object
    Generic unknown wrapper for handling polymorphic types that don't have specific implementations. Preserves the raw JSON data and extracts the discriminator value.
    • Constructor Summary

      Constructors 
      Constructor Description
      UnknownType​(com.fasterxml.jackson.databind.JsonNode rawNode)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.fasterxml.jackson.databind.JsonNode asJson()
      Get the raw JSON data for this unknown type.
      boolean equals​(java.lang.Object o)  
      protected java.util.Optional<java.lang.String> extractDiscriminator​(java.lang.String key)
      Extract the discriminator value from the JSON node.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • UnknownType

        public UnknownType​(com.fasterxml.jackson.databind.JsonNode rawNode)
    • Method Detail

      • extractDiscriminator

        protected java.util.Optional<java.lang.String> extractDiscriminator​(java.lang.String key)
        Extract the discriminator value from the JSON node.
        Parameters:
        key - the discriminator property name
        Returns:
        the discriminator value if present
      • asJson

        public com.fasterxml.jackson.databind.JsonNode asJson()
        Get the raw JSON data for this unknown type.
        Returns:
        the raw JSON node
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object