Class LicenseChoiceSerializer

java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<LicenseChoice>
com.fasterxml.jackson.databind.ser.std.StdSerializer<LicenseChoice>
org.cyclonedx.util.serializer.LicenseChoiceSerializer
All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable, com.fasterxml.jackson.databind.jsonschema.SchemaAware, Serializable

public class LicenseChoiceSerializer extends com.fasterxml.jackson.databind.ser.std.StdSerializer<LicenseChoice>
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer

    com.fasterxml.jackson.databind.JsonSerializer.None
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final boolean
     
    private final Version
     

    Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

    _handledType
  • Constructor Summary

    Constructors
    Constructor
    Description
    LicenseChoiceSerializer(boolean isXml, Version version)
     
    LicenseChoiceSerializer(Class<LicenseChoice> t, boolean isXml, Version version)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    serialize(LicenseChoice licenseChoice, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider)
     
    private void
    serializeExpressionToJson(LicenseChoice licenseChoice, com.fasterxml.jackson.core.JsonGenerator gen)
     
    private void
    serializeExpressionToXml(LicenseChoice licenseChoice, com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator toXmlGenerator)
     
    private void
    serializeJson(LicenseChoice licenseChoice, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider)
     
    private void
    serializeLicensesToJsonArray(LicenseChoice licenseChoice, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider)
     
    private void
    serializeXml(com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator toXmlGenerator, LicenseChoice lc, com.fasterxml.jackson.databind.SerializerProvider provider)
     
    private void
    serializeXmlAttributes(com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator toXmlGenerator, String bomRef, String acknowledgement, Object object)
     
    private boolean
     
    private boolean
     

    Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

    _neitherNull, _nonEmpty, acceptJsonFormatVisitor, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow

    Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

    getDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId, withIgnoredProperties

    Methods inherited from class java.lang.Object

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

    • isXml

      private final boolean isXml
    • version

      private final Version version
  • Constructor Details

    • LicenseChoiceSerializer

      public LicenseChoiceSerializer(boolean isXml, Version version)
    • LicenseChoiceSerializer

      public LicenseChoiceSerializer(Class<LicenseChoice> t, boolean isXml, Version version)
  • Method Details

    • serialize

      public void serialize(LicenseChoice licenseChoice, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException
      Specified by:
      serialize in class com.fasterxml.jackson.databind.ser.std.StdSerializer<LicenseChoice>
      Throws:
      IOException
    • serializeXml

      private void serializeXml(com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator toXmlGenerator, LicenseChoice lc, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException
      Throws:
      IOException
    • serializeXmlAttributes

      private void serializeXmlAttributes(com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator toXmlGenerator, String bomRef, String acknowledgement, Object object) throws IOException
      Throws:
      IOException
    • serializeJson

      private void serializeJson(LicenseChoice licenseChoice, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException
      Throws:
      IOException
    • serializeExpressionToXml

      private void serializeExpressionToXml(LicenseChoice licenseChoice, com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator toXmlGenerator) throws IOException
      Throws:
      IOException
    • serializeLicensesToJsonArray

      private void serializeLicensesToJsonArray(LicenseChoice licenseChoice, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException
      Throws:
      IOException
    • serializeExpressionToJson

      private void serializeExpressionToJson(LicenseChoice licenseChoice, com.fasterxml.jackson.core.JsonGenerator gen) throws IOException
      Throws:
      IOException
    • shouldSerialize

      private boolean shouldSerialize(Object obj)
    • shouldSerializeField

      private boolean shouldSerializeField(Object obj, String fieldName)