Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.jackson.databind.node;
 
 
 
This intermediate base class is used for all leaf nodes, that is, all non-container (array or object) nodes, except for the "missing node".
public abstract class ValueNode
    extends BaseJsonNode
    protected ValueNode() { }

    
All current value nodes are immutable, so we can just return them as is.
    @SuppressWarnings("unchecked")
    @Override
    public <T extends JsonNode> T deepCopy() { return (T) this; }
    
    @Override public boolean isValueNode() { return true; }
    @Override public abstract JsonToken asToken();
    @Override
    public void serializeWithType(JsonGenerator jgSerializerProvider provider,
            TypeSerializer typeSer)
        throws IOExceptionJsonProcessingException
    {
        typeSer.writeTypePrefixForScalar(thisjg);
        serialize(jgprovider);
        typeSer.writeTypeSuffixForScalar(thisjg);
    }
    
    /*
    /**********************************************************************
    /* Public API, path handling
    /**********************************************************************
     */
    @Override
    public JsonNode path(String fieldName) { return MissingNode.getInstance(); }
    @Override
    public JsonNode path(int index) { return MissingNode.getInstance(); }
    /*
    /**********************************************************************
    /* Base impls for standard methods
    /**********************************************************************
     */
    @Override
    public String toString() { return asText(); }
New to GrepCode? Check out our FAQ X