Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.jackson.databind.cfg;
 
Configuration settings container class for com.fasterxml.jackson.databind.ser.SerializerFactory implementations.
 
public final class SerializerFactoryConfig
    implements java.io.Serializable
    private static final long serialVersionUID = 1L;
    
Constant for empty Serializers array (which by definition is stateless and reusable)
    protected final static Serializers[] NO_SERIALIZERS = new Serializers[0];
    protected final static BeanSerializerModifier[] NO_MODIFIERS = new BeanSerializerModifier[0];
    
    
List of providers for additional serializers, checked before considering default basic or bean serialializers.
    protected final Serializers[] _additionalSerializers;

    
List of providers for additional key serializers, checked before considering default key serialializers.
    protected final Serializers[] _additionalKeySerializers;
    
    
List of modifiers that can change the way com.fasterxml.jackson.databind.ser.BeanSerializer instances are configured and constructed.
    protected final BeanSerializerModifier[] _modifiers;
    
    public SerializerFactoryConfig() {
        this(nullnullnull);
    }
    protected SerializerFactoryConfig(Serializers[] allAdditionalSerializers,
            Serializers[] allAdditionalKeySerializers,
            BeanSerializerModifier[] modifiers)
    {
         = (allAdditionalSerializers == null) ?
                 : allAdditionalSerializers;
         = (allAdditionalKeySerializers == null) ?
                 : allAdditionalKeySerializers;
         = (modifiers == null) ?  : modifiers;
    }
    {
        if (additional == null) {
            throw new IllegalArgumentException("Can not pass null Serializers");
        }
        Serializers[] all = ArrayBuilders.insertInListNoDup(additional);
        return new SerializerFactoryConfig(all);
    }
    {
        if (additional == null) {
            throw new IllegalArgumentException("Can not pass null Serializers");
        }
        Serializers[] all = ArrayBuilders.insertInListNoDup(additional);
        return new SerializerFactoryConfig(all);
    }
    
    {
        if (modifier == null) {
            throw new IllegalArgumentException("Can not pass null modifier");
        }
        BeanSerializerModifier[] modifiers = ArrayBuilders.insertInListNoDup(modifier);
    }
    public boolean hasSerializers() { return . > 0; }
    public boolean hasKeySerializers() { return . > 0; }
    
    public boolean hasSerializerModifiers() { return . > 0; }
    
    public Iterable<Serializersserializers() {
        return ArrayBuilders.arrayAsIterable();
    }
    public Iterable<SerializerskeySerializers() {
        return ArrayBuilders.arrayAsIterable();
    }
    
        return ArrayBuilders.arrayAsIterable();
    }
New to GrepCode? Check out our FAQ X