Sha256: a5433b80237a4b0992140f4b43b5b7291ccba08e843243ddf67df19e50ee16e6

Contents?: true

Size: 1.5 KB

Versions: 164

Compression:

Stored size: 1.5 KB

Contents

package sh.calaba.org.codehaus.jackson.map.module;

import java.util.HashMap;

import sh.calaba.org.codehaus.jackson.map.BeanDescription;
import sh.calaba.org.codehaus.jackson.map.DeserializationConfig;
import sh.calaba.org.codehaus.jackson.map.deser.ValueInstantiator;
import sh.calaba.org.codehaus.jackson.map.deser.ValueInstantiators;
import sh.calaba.org.codehaus.jackson.map.type.ClassKey;

public class SimpleValueInstantiators
    extends ValueInstantiators.Base
{
    /**
     * Mappings from raw (type-erased, i.e. non-generic) types
     * to matching {@link ValueInstantiator} instances.
     */
    protected HashMap<ClassKey,ValueInstantiator> _classMappings;

    /*
    /**********************************************************
    /* Life-cycle, construction and configuring
    /**********************************************************
     */

    public SimpleValueInstantiators()
    {
        _classMappings = new HashMap<ClassKey,ValueInstantiator>();        
    }
    
    public SimpleValueInstantiators addValueInstantiator(Class<?> forType,
            ValueInstantiator inst)
    {
        _classMappings.put(new ClassKey(forType), inst);
        return this;
    }
    
    @Override
    public ValueInstantiator findValueInstantiator(DeserializationConfig config,
            BeanDescription beanDesc, ValueInstantiator defaultInstantiator)
    {
        ValueInstantiator inst = _classMappings.get(new ClassKey(beanDesc.getBeanClass()));
        return (inst == null) ? defaultInstantiator : inst;
    }
}

Version data entries

164 entries across 164 versions & 2 rubygems

Version Path
calabash-android-0.3.2.pre1 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.3.1 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.3.0 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.3.0.pre10 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.3.0.pre9 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.3.0.pre8 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.3.0.pre7 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.3.0.pre6 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.3.0.pre5 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.3.0.pre4 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.3.0.pre3 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.3.0.pre2 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.3.0.pre1 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.2.22 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.2.21 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.2.20 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.2.19 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.2.18 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.2.17 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java
calabash-android-0.2.16 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java