Java 类org.codehaus.jackson.JsonStreamContext 实例源码

项目:es-hadoop-v2.2.0    文件:JacksonJsonParser.java   
@Override
public String absoluteName() {
    List<String> tree = new ArrayList<String>();
    for (JsonStreamContext ctx = parser.getParsingContext(); ctx != null; ctx = ctx.getParent()) {
        if (ctx.inObject()) {
            tree.add(ctx.getCurrentName());
        }
    }
    StringBuilder sb = new StringBuilder();
    for (int index = tree.size(); index > 0; index--) {
        sb.append(tree.get(index - 1));
        sb.append(".");
    }

    // remove the last .
    sb.setLength(sb.length() - 1);
    return sb.toString();
}
项目:es-hadoop-v2.2.0    文件:BackportedJacksonMappingIterator.java   
@SuppressWarnings("unchecked")
protected BackportedJacksonMappingIterator(JavaType type, JsonParser jp, DeserializationContext ctxt, JsonDeserializer<?> deser) {
    _type = type;
    _parser = jp;
    _context = ctxt;
    _deserializer = (JsonDeserializer<T>) deser;

    /* One more thing: if we are at START_ARRAY (but NOT root-level
     * one!), advance to next token (to allow matching END_ARRAY)
     */
    if (jp != null && jp.getCurrentToken() == JsonToken.START_ARRAY) {
        JsonStreamContext sc = jp.getParsingContext();
        // safest way to skip current token is to clear it (so we'll advance soon)
        if (!sc.inRoot()) {
            jp.clearCurrentToken();
        }
    }
}
项目:elasticsearch-hadoop    文件:JacksonJsonParser.java   
@Override
public String absoluteName() {
    List<String> tree = new ArrayList<String>();
    for (JsonStreamContext ctx = parser.getParsingContext(); ctx != null; ctx = ctx.getParent()) {
        if (ctx.inObject()) {
            tree.add(ctx.getCurrentName());
        }
    }
    StringBuilder sb = new StringBuilder();
    for (int index = tree.size(); index > 0; index--) {
        sb.append(tree.get(index - 1));
        sb.append(".");
    }

    // remove the last .
    sb.setLength(sb.length() - 1);
    return sb.toString();
}
项目:elasticsearch-hadoop    文件:BackportedJacksonMappingIterator.java   
@SuppressWarnings("unchecked")
protected BackportedJacksonMappingIterator(JavaType type, JsonParser jp, DeserializationContext ctxt, JsonDeserializer<?> deser) {
    _type = type;
    _parser = jp;
    _context = ctxt;
    _deserializer = (JsonDeserializer<T>) deser;

    /* One more thing: if we are at START_ARRAY (but NOT root-level
     * one!), advance to next token (to allow matching END_ARRAY)
     */
    if (jp != null && jp.getCurrentToken() == JsonToken.START_ARRAY) {
        JsonStreamContext sc = jp.getParsingContext();
        // safest way to skip current token is to clear it (so we'll advance soon)
        if (!sc.inRoot()) {
            jp.clearCurrentToken();
        }
    }
}
项目:12306-android-Decompile    文件:JsonGeneratorDelegate.java   
public JsonStreamContext getOutputContext()
{
  return this.delegate.getOutputContext();
}
项目:12306-android-Decompile    文件:TokenBuffer.java   
public JsonStreamContext getParsingContext()
{
  return this._parsingContext;
}
项目:12306-android-Decompile    文件:JsonParserDelegate.java   
public JsonStreamContext getParsingContext()
{
  return this.delegate.getParsingContext();
}
项目:12306-android-Decompile    文件:TreeTraversingParser.java   
public JsonStreamContext getParsingContext()
{
  return this._nodeCursor;
}
项目:RHome    文件:JsonGeneratorDelegate.java   
@Override
public JsonStreamContext getOutputContext() {
    return delegate.getOutputContext();
}
项目:12306-android-Decompile    文件:JsonGeneratorDelegate.java   
public JsonStreamContext getOutputContext()
{
  return this.delegate.getOutputContext();
}
项目:12306-android-Decompile    文件:TokenBuffer.java   
public JsonStreamContext getParsingContext()
{
  return this._parsingContext;
}
项目:12306-android-Decompile    文件:JsonParserDelegate.java   
public JsonStreamContext getParsingContext()
{
  return this.delegate.getParsingContext();
}
项目:12306-android-Decompile    文件:TreeTraversingParser.java   
public JsonStreamContext getParsingContext()
{
  return this._nodeCursor;
}
项目:12306-android-Decompile    文件:JsonParserMinimalBase.java   
public abstract JsonStreamContext getParsingContext();
项目:jee-rest    文件:JsonRootWrapperDeserializerUnitTest.java   
@Override public JsonStreamContext getParsingContext() {throw new UnsupportedOperationException("Not required for tests.");}
项目:12306-android-Decompile    文件:JsonParserMinimalBase.java   
public abstract JsonStreamContext getParsingContext();