Class UnknownType
- java.lang.Object
-
- com.stackone.stackone_client_java.utils.UnknownType
-
public class UnknownType extends java.lang.ObjectGeneric 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.JsonNodeasJson()Get the raw JSON data for this unknown type.booleanequals(java.lang.Object o)protected java.util.Optional<java.lang.String>extractDiscriminator(java.lang.String key)Extract the discriminator value from the JSON node.inthashCode()java.lang.StringtoString()
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-