Package org.cyclonedx.util.serializer
Class ExtensionSerializer
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable,com.fasterxml.jackson.databind.jsonschema.SchemaAware,Serializable
public class ExtensionSerializer
extends com.fasterxml.jackson.databind.ser.std.StdSerializer<Extension>
- 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 inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
_handledType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidgenerateTextNode(XMLStreamWriter writer, String fieldName, String value, String namespaceUri, String prefix) private voidgenerateTextNodeFromNumber(XMLStreamWriter writer, String fieldName, Number value, String namespaceUri, String prefix) private voidprocessAdvisories(XMLStreamWriter staxWriter, Vulnerability10 vuln) private voidprocessCwes(XMLStreamWriter staxWriter, Vulnerability10 vuln) private voidprocessRatings(XMLStreamWriter staxWriter, Vulnerability10 vuln) private voidprocessRecommendations(XMLStreamWriter staxWriter, Vulnerability10 vuln) private voidprocessSource(XMLStreamWriter staxWriter, Vulnerability10 vulnerability) voidserialize(Extension value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider) private voidserializeVulnerabilities(com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator gen, Extension vulns) 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, wrapAndThrowMethods inherited from class com.fasterxml.jackson.databind.JsonSerializer
getDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId, withIgnoredProperties
-
Constructor Details
-
ExtensionSerializer
public ExtensionSerializer() -
ExtensionSerializer
-
-
Method Details
-
serialize
public void serialize(Extension value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException - Specified by:
serializein classcom.fasterxml.jackson.databind.ser.std.StdSerializer<Extension>- Throws:
IOException
-
serializeVulnerabilities
private void serializeVulnerabilities(com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator gen, Extension vulns) throws XMLStreamException - Throws:
XMLStreamException
-
processAdvisories
private void processAdvisories(XMLStreamWriter staxWriter, Vulnerability10 vuln) throws XMLStreamException - Throws:
XMLStreamException
-
processRecommendations
private void processRecommendations(XMLStreamWriter staxWriter, Vulnerability10 vuln) throws XMLStreamException - Throws:
XMLStreamException
-
processCwes
private void processCwes(XMLStreamWriter staxWriter, Vulnerability10 vuln) throws XMLStreamException - Throws:
XMLStreamException
-
processSource
private void processSource(XMLStreamWriter staxWriter, Vulnerability10 vulnerability) throws XMLStreamException - Throws:
XMLStreamException
-
processRatings
private void processRatings(XMLStreamWriter staxWriter, Vulnerability10 vuln) throws XMLStreamException - Throws:
XMLStreamException
-
generateTextNodeFromNumber
private void generateTextNodeFromNumber(XMLStreamWriter writer, String fieldName, Number value, String namespaceUri, String prefix) throws XMLStreamException - Throws:
XMLStreamException
-
generateTextNode
private void generateTextNode(XMLStreamWriter writer, String fieldName, String value, String namespaceUri, String prefix) throws XMLStreamException - Throws:
XMLStreamException
-