com.fasterxml.jackson.databind.JsonSerializer.java Source code

Java tutorial

Introduction

Here is the source code for com.fasterxml.jackson.databind.JsonSerializer.java

Source

package com.fasterxml.jackson.databind;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
import com.fasterxml.jackson.databind.util.NameTransformer;

public abstract class JsonSerializer<T> {
    public Class<T> handledType() {
        return null;
    }

    public boolean isEmpty(T paramT) {
        return paramT == null;
    }

    public boolean isUnwrappingSerializer() {
        return false;
    }

    public abstract void serialize(T paramT, JsonGenerator paramJsonGenerator,
            SerializerProvider paramSerializerProvider);

    public void serializeWithType(T paramT, JsonGenerator paramJsonGenerator,
            SerializerProvider paramSerializerProvider, TypeSerializer paramTypeSerializer) {
        Class localClass = handledType();
        if (localClass == null)
            localClass = paramT.getClass();
        throw new UnsupportedOperationException(
                "Type id handling not implemented for type " + localClass.getName());
    }

    public JsonSerializer<T> unwrappingSerializer(NameTransformer paramNameTransformer) {
        return this;
    }

    public boolean usesObjectId() {
        return false;
    }

    public static abstract class None extends JsonSerializer<Object> {
    }
}

/* Location:           /Users/dantheman/src/fffffffffattttt/basis/classes_dex2jar.jar
 * Qualified Name:     com.fasterxml.jackson.databind.JsonSerializer
 * JD-Core Version:    0.6.2
 */