com.fasterxml.jackson.module.afterburner.deser

## Class CreatorOptimizer

- java.lang.Object
- - com.fasterxml.jackson.module.afterburner.util.DynamicPropertyAccessorBase
  - - com.fasterxml.jackson.module.afterburner.deser.CreatorOptimizer

    public class CreatorOptimizer
    extends DynamicPropertyAccessorBase

Helper class that tries to generate `ValueInstantiator` class that calls constructors and/or factory methods directly, instead of using Reflection.

### Field Summary

Fields
`protected MyClassLoader` `_classLoader`
`protected com.fasterxml.jackson.databind.deser.std.StdValueInstantiator` `_originalInstantiator`
`protected Class<?>` `_valueClass`

### Fields inherited from class com.fasterxml.jackson.module.afterburner.util.DynamicPropertyAccessorBase

`ALL_INT_CONSTS`

### Constructor Summary

Constructors
Constructor and Description
`CreatorOptimizer(Class<?> valueClass, MyClassLoader classLoader, com.fasterxml.jackson.databind.deser.std.StdValueInstantiator orig)`

### Method Summary

Methods
`protected void` `addCreator(org.objectweb.asm.MethodVisitor mv, Constructor<?> ctor)`
`protected void` `addCreator(org.objectweb.asm.MethodVisitor mv, Method factory)`
`com.fasterxml.jackson.databind.deser.ValueInstantiator` `createOptimized()`
`protected OptimizedValueInstantiator` `createSubclass(Constructor<?> ctor, Method factory)`
`protected byte[]` `generateOptimized(String srcName, Constructor<?> ctor, Method factory)`

### Methods inherited from class com.fasterxml.jackson.module.afterburner.util.DynamicPropertyAccessorBase

`_add, generateException, internalClassName`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### _valueClass

    protected final Class<?> _valueClass

#### _classLoader

    protected final MyClassLoader _classLoader

#### _originalInstantiator

    protected final com.fasterxml.jackson.databind.deser.std.StdValueInstantiator _originalInstantiator

### Constructor Detail

#### CreatorOptimizer

    public CreatorOptimizer(Class<?> valueClass,
                    MyClassLoader classLoader,
                    com.fasterxml.jackson.databind.deser.std.StdValueInstantiator orig)

### Method Detail

#### createOptimized

    public com.fasterxml.jackson.databind.deser.ValueInstantiator createOptimized()

#### createSubclass

    protected OptimizedValueInstantiator createSubclass(Constructor<?> ctor,
                                            Method factory)

#### generateOptimized

    protected byte[] generateOptimized(String srcName,
                           Constructor<?> ctor,
                           Method factory)

#### addCreator

    protected void addCreator(org.objectweb.asm.MethodVisitor mv,
                  Constructor<?> ctor)

#### addCreator

    protected void addCreator(org.objectweb.asm.MethodVisitor mv,
                  Method factory)