Class JsonTypeInfo.Value

    • Field Detail

      • _propertyName

        protected final java.lang.String _propertyName
      • _defaultImpl

        protected final java.lang.Class<?> _defaultImpl
      • _idVisible

        protected final boolean _idVisible
      • _requireTypeIdForSubtypes

        protected final java.lang.Boolean _requireTypeIdForSubtypes
      • _writeTypeIdForDefaultImpl

        protected final java.lang.Boolean _writeTypeIdForDefaultImpl
        Since:
        2.22
    • Constructor Detail

      • Value

        protected Value​(JsonTypeInfo.Id idType,
                        JsonTypeInfo.As inclusionType,
                        java.lang.String propertyName,
                        java.lang.Class<?> defaultImpl,
                        boolean idVisible,
                        java.lang.Boolean requireTypeIdForSubtypes,
                        java.lang.Boolean writeTypeIdForDefaultImpl)
        Since:
        2.22
      • Value

        @Deprecated
        protected Value​(JsonTypeInfo.Id idType,
                        JsonTypeInfo.As inclusionType,
                        java.lang.String propertyName,
                        java.lang.Class<?> defaultImpl,
                        boolean idVisible,
                        java.lang.Boolean requireTypeIdForSubtypes)
        Deprecated.
        Since 2.22 use the 7-argument overload
    • Method Detail

      • construct

        public static JsonTypeInfo.Value construct​(JsonTypeInfo.Id idType,
                                                   JsonTypeInfo.As inclusionType,
                                                   java.lang.String propertyName,
                                                   java.lang.Class<?> defaultImpl,
                                                   boolean idVisible,
                                                   java.lang.Boolean requireTypeIdForSubtypes,
                                                   java.lang.Boolean writeTypeIdForDefaultImpl)
        Since:
        2.22
      • construct

        @Deprecated
        public static JsonTypeInfo.Value construct​(JsonTypeInfo.Id idType,
                                                   JsonTypeInfo.As inclusionType,
                                                   java.lang.String propertyName,
                                                   java.lang.Class<?> defaultImpl,
                                                   boolean idVisible,
                                                   java.lang.Boolean requireTypeIdForSubtypes)
        Deprecated.
        Since 2.22 use the 7-argument overload
      • withDefaultImpl

        public JsonTypeInfo.Value withDefaultImpl​(java.lang.Class<?> impl)
      • withPropertyName

        public JsonTypeInfo.Value withPropertyName​(java.lang.String propName)
      • withRequireTypeIdForSubtypes

        public JsonTypeInfo.Value withRequireTypeIdForSubtypes​(java.lang.Boolean requireTypeIdForSubtypes)
      • withWriteTypeIdForDefaultImpl

        public JsonTypeInfo.Value withWriteTypeIdForDefaultImpl​(java.lang.Boolean writeTypeIdForDefaultImpl)
        Since:
        2.22
      • valueFor

        public java.lang.Class<JsonTypeInfo> valueFor()
        Description copied from interface: JacksonAnnotationValue
        Introspection method that may be used to find actual annotation that may be used as the source for value instance.
        Specified by:
        valueFor in interface JacksonAnnotationValue<JsonTypeInfo>
        Returns:
        Annotation class for which instances of this value class are created
      • getDefaultImpl

        public java.lang.Class<?> getDefaultImpl()
      • getPropertyName

        public java.lang.String getPropertyName()
      • getIdVisible

        public boolean getIdVisible()
      • getRequireTypeIdForSubtypes

        public java.lang.Boolean getRequireTypeIdForSubtypes()
      • getWriteTypeIdForDefaultImpl

        public java.lang.Boolean getWriteTypeIdForDefaultImpl()
        Since:
        2.22
      • shouldWriteTypeIdForDefaultImpl

        public boolean shouldWriteTypeIdForDefaultImpl()
        Since:
        2.22
      • isEnabled

        public static boolean isEnabled​(JsonTypeInfo.Value v)
        Static helper method for simple(r) checking of whether there's a Value instance that indicates that polymorphic handling is (to be) enabled.
      • toString

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

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

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