public class ClassSerializer extends StdScalarSerializer<java.lang.Class<?>>
JsonSerializer.None| Constructor and Description |
|---|
ClassSerializer() |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor,
JavaType typeHint)
Default implementation specifies no format.
|
JsonNode |
getSchema(SerializerProvider provider,
java.lang.reflect.Type typeHint)
Default implementation simply claims type is "string"; usually
overriden by custom serializers.
|
void |
serialize(java.lang.Class<?> value,
JsonGenerator g,
SerializerProvider provider)
Method that can be called to ask implementation to serialize
values of type this serializer handles.
|
serializeWithTypegetSchema, handledType, wrapAndThrow, wrapAndThrowgetDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterIdpublic void serialize(java.lang.Class<?> value,
JsonGenerator g,
SerializerProvider provider)
throws java.io.IOException
JsonSerializerserialize in class StdSerializer<java.lang.Class<?>>value - Value to serialize; can not be null.g - Generator used to output resulting Json contentprovider - Provider that can be used to get serializers for
serializing Objects value contains, if any.java.io.IOExceptionpublic JsonNode getSchema(SerializerProvider provider, java.lang.reflect.Type typeHint)
StdSerializergetSchema in interface SchemaAwaregetSchema in class StdScalarSerializer<java.lang.Class<?>>provider - The serializer provider.typeHint - A hint about the type.public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException
StdSerializeracceptJsonFormatVisitor in interface JsonFormatVisitableacceptJsonFormatVisitor in class StdScalarSerializer<java.lang.Class<?>>typeHint - Type of element (entity like property) being visitedJsonMappingExceptionCopyright © 2010 - 2023 Adobe. All Rights Reserved