Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.jackson.module.afterburner.deser;
 
 
Base class for concrete type-specific org.codehaus.jackson.map.deser.SettableBeanProperty implementations.
    extends SettableBeanProperty
{
    
We will need to keep the original instance handy as some calls are best just delegated
    protected final SettableBeanProperty _originalSettable;
    
    protected final BeanPropertyMutator _propertyMutator;
    protected final int _propertyIndex;
    
            BeanPropertyMutator mutatorint index)
    {
        super(src);
         = src;
         = mutator;
         = index;
    }
            JsonDeserializer<Objectdeser)
    {
        super(srcdeser);
         = src;
         = src._propertyMutator;
         = src._propertyIndex;
    }
            
    public abstract T withMutator(BeanPropertyMutator mut);
    public abstract T withValueDeserializer(JsonDeserializer<Objectdeser);
    
    @Override
    public abstract void deserializeAndSet(JsonParser jpDeserializationContext ctxt,
            Object arg2throws IOExceptionJsonProcessingException;
    @Override
    public <A extends Annotation> A getAnnotation(Class<A> ann) {
        return .getAnnotation(ann);
    }
    @Override
    public AnnotatedMember getMember() {
        return .getMember();
    }
    @Override
    public abstract void set(Object beanObject valuethrows IOException;

    
Helper method for coercing JSON values other than Strings into Java String value.
    protected final String _convertToString(JsonParser jpDeserializationContext ctxt,
            JsonToken curr)
        throws IOExceptionJsonProcessingException
    {
        if (curr == .) {
            return null;
        }
        if (curr == .) {
            Object ob = jp.getEmbeddedObject();
            if (ob == null) {
                return null;
            }
            if (ob instanceof byte[]) {
                return Base64Variants.getDefaultVariant().encode((byte[]) obfalse);
            }
            return ob.toString();
        }
        // Can deserialize any scalar value
        if (curr.isScalarValue()) {
            return jp.getText();
        }
        // but not markers:
        throw ctxt.mappingException(String.class);
    }
New to GrepCode? Check out our FAQ X