Examples of ClassKey


Examples of com.facebook.presto.jdbc.internal.jackson.databind.type.ClassKey

    @Override
    public JavaType findTypeMapping(DeserializationConfig config, JavaType type)
    {
        // this is the main mapping base, so let's
        Class<?> src = type.getRawClass();
        Class<?> dst = _mappings.get(new ClassKey(src));
        if (dst == null) {
            return null;
        }
        return type.narrowBy(dst);
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.type.ClassKey

    }
   
    public SimpleValueInstantiators addValueInstantiator(Class<?> forType,
            ValueInstantiator inst)
    {
        _classMappings.put(new ClassKey(forType), inst);
        return this;
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.type.ClassKey

   
    @Override
    public ValueInstantiator findValueInstantiator(DeserializationConfig config,
            BeanDescription beanDesc, ValueInstantiator defaultInstantiator)
    {
        ValueInstantiator inst = _classMappings.get(new ClassKey(beanDesc.getBeanClass()));
        return (inst == null) ? defaultInstantiator : inst;
    }
View Full Code Here

Examples of com.fasterxml.classmate.util.ClassKey

    }

    private ResolvedType _fromClass(ClassStack context, Class<?> rawType, TypeBindings typeBindings)
    {
        // First: a primitive type perhaps?
        ResolvedType type = _primitiveTypes.get(new ClassKey(rawType));
        if (type != null) {
            return type;
        }
        // Second: recursive reference?
        if (context == null) {
View Full Code Here

Examples of com.fasterxml.classmate.util.ClassKey

            return getInclusionForClass(annotationType);
        }

        public void setInclusion(Class<? extends Annotation> annotationType, AnnotationInclusion incl)
        {
            _inclusions.put(new ClassKey(annotationType), incl);
        }
View Full Code Here

Examples of com.fasterxml.classmate.util.ClassKey

            _inclusions.put(new ClassKey(annotationType), incl);
        }

        protected AnnotationInclusion _inclusionFor(Class<? extends Annotation> annotationType)
        {
            ClassKey key = new ClassKey(annotationType);
            AnnotationInclusion beh = _inclusions.get(key);
            return (beh == null) ? _defaultInclusion : beh;
        }
View Full Code Here

Examples of com.fasterxml.jackson.databind.type.ClassKey

   
        JsonDeserializer<Object> subDeser;

        // First: maybe we have already created sub-type deserializer?
        synchronized (this) {
            subDeser = (_subDeserializers == null) ? null : _subDeserializers.get(new ClassKey(bean.getClass()));
        }
        if (subDeser != null) {
            return subDeser;
        }
        // If not, maybe we can locate one. First, need provider
        JavaType type = ctxt.constructType(bean.getClass());
        /* 30-Jan-2012, tatu: Ideally we would be passing referring
         *   property; which in theory we could keep track of via
         *   ResolvableDeserializer (if we absolutely must...).
         *   But for now, let's not bother.
         */
//        subDeser = ctxt.findValueDeserializer(type, _property);
        subDeser = ctxt.findRootValueDeserializer(type);
        // Also, need to cache it
        if (subDeser != null) {
            synchronized (this) {
                if (_subDeserializers == null) {
                    _subDeserializers = new HashMap<ClassKey,JsonDeserializer<Object>>();;
                }
                _subDeserializers.put(new ClassKey(bean.getClass()), subDeser);
            }           
        }
        return subDeser;
    }
View Full Code Here

Examples of com.fasterxml.jackson.databind.type.ClassKey

    public final void setMixInAnnotations(Map<Class<?>, Class<?>> sourceMixins)
    {
        _mixInAnnotations.clear();
        if (sourceMixins != null && sourceMixins.size() > 0) {
            for (Map.Entry<Class<?>,Class<?>> en : sourceMixins.entrySet()) {
                _mixInAnnotations.put(new ClassKey(en.getKey()), en.getValue());
            }
        }
    }
View Full Code Here

Examples of com.fasterxml.jackson.databind.type.ClassKey

     * @param mixinSource Class (or interface) whose annotations are to
     *   be "added" to target's annotations, overriding as necessary
     */
    public final void addMixInAnnotations(Class<?> target, Class<?> mixinSource)
    {
        _mixInAnnotations.put(new ClassKey(target), mixinSource);
    }
View Full Code Here

Examples of com.fasterxml.jackson.databind.type.ClassKey

    {
        _mixInAnnotations.put(new ClassKey(target), mixinSource);
    }

    public final Class<?> findMixInClassFor(Class<?> cls) {
        return (_mixInAnnotations == null) ? null : _mixInAnnotations.get(new ClassKey(cls));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.