com.fasterxml.jackson.module.afterburner.ser.OptimizedBeanPropertyWriter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jackson-module-afterburner Show documentation
Show all versions of jackson-module-afterburner Show documentation
Jackson (https://github.com/FasterXML/jackson) extension module
used to enhance performance using bytecode generation to replace use of Reflection for
field access and method calls
package com.fasterxml.jackson.module.afterburner.ser;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.SerializableString;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
import com.fasterxml.jackson.databind.ser.BeanPropertyWriter;
/**
* Intermediate base class that is used for concrete
* per-type implementations
*/
@SuppressWarnings("serial")
abstract class OptimizedBeanPropertyWriter>
extends BeanPropertyWriter
{
protected final BeanPropertyAccessor _propertyAccessor;
/**
* Locally stored version of efficiently serializable name.
* Used to work around earlier problems with typing between
* interface, implementation
*
* @since 2.5
*/
protected final SerializableString _fastName;
protected final int _propertyIndex;
protected final BeanPropertyWriter fallbackWriter;
// Not volatile to prevent overhead, worst case is we trip the exception a few extra times
protected boolean broken = false;
protected OptimizedBeanPropertyWriter(BeanPropertyWriter src,
BeanPropertyAccessor propertyAccessor, int propertyIndex,
JsonSerializer