Java 类org.codehaus.jackson.sym.CharsToNameCanonicalizer 实例源码

项目:RHome    文件:ByteSourceBootstrapper.java   
public JsonParser constructParser(int features, ObjectCodec codec, BytesToNameCanonicalizer rootByteSymbols, CharsToNameCanonicalizer rootCharSymbols)
    throws IOException, JsonParseException
{
    JsonEncoding enc = detectEncoding();

    // As per [JACKSON-259], may want to fully disable canonicalization:
    boolean canonicalize = JsonParser.Feature.CANONICALIZE_FIELD_NAMES.enabledIn(features);
    boolean intern = JsonParser.Feature.INTERN_FIELD_NAMES.enabledIn(features);
    if (enc == JsonEncoding.UTF8) {
        /* and without canonicalization, byte-based approach is not performance; just use std UTF-8 reader
         * (which is ok for larger input; not so hot for smaller; but this is not a common case)
         */
        if (canonicalize) {
            BytesToNameCanonicalizer can = rootByteSymbols.makeChild(canonicalize, intern);
            return new Utf8StreamParser(_context, features, _in, codec, can, _inputBuffer, _inputPtr, _inputEnd, _bufferRecyclable);
        }
    }
    return new ReaderBasedParser(_context, features, constructReader(), codec, rootCharSymbols.makeChild(canonicalize, intern));
}
项目:12306-android-Decompile    文件:ByteSourceBootstrapper.java   
public JsonParser constructParser(int paramInt, ObjectCodec paramObjectCodec, BytesToNameCanonicalizer paramBytesToNameCanonicalizer, CharsToNameCanonicalizer paramCharsToNameCanonicalizer)
  throws IOException, JsonParseException
{
  JsonEncoding localJsonEncoding = detectEncoding();
  boolean bool1 = JsonParser.Feature.CANONICALIZE_FIELD_NAMES.enabledIn(paramInt);
  boolean bool2 = JsonParser.Feature.INTERN_FIELD_NAMES.enabledIn(paramInt);
  if ((localJsonEncoding == JsonEncoding.UTF8) && (bool1))
  {
    BytesToNameCanonicalizer localBytesToNameCanonicalizer = paramBytesToNameCanonicalizer.makeChild(bool1, bool2);
    return new Utf8StreamParser(this._context, paramInt, this._in, paramObjectCodec, localBytesToNameCanonicalizer, this._inputBuffer, this._inputPtr, this._inputEnd, this._bufferRecyclable);
  }
  return new ReaderBasedParser(this._context, paramInt, constructReader(), paramObjectCodec, paramCharsToNameCanonicalizer.makeChild(bool1, bool2));
}
项目:RHome    文件:ReaderBasedParser.java   
public ReaderBasedParser(IOContext ioCtxt, int features, Reader r,
                         ObjectCodec codec, CharsToNameCanonicalizer st)
{
    super(ioCtxt, features, r);
    _objectCodec = codec;
    _symbols = st;
}
项目:12306-android-Decompile    文件:ByteSourceBootstrapper.java   
public JsonParser constructParser(int paramInt, ObjectCodec paramObjectCodec, BytesToNameCanonicalizer paramBytesToNameCanonicalizer, CharsToNameCanonicalizer paramCharsToNameCanonicalizer)
  throws IOException, JsonParseException
{
  JsonEncoding localJsonEncoding = detectEncoding();
  boolean bool1 = JsonParser.Feature.CANONICALIZE_FIELD_NAMES.enabledIn(paramInt);
  boolean bool2 = JsonParser.Feature.INTERN_FIELD_NAMES.enabledIn(paramInt);
  if ((localJsonEncoding == JsonEncoding.UTF8) && (bool1))
  {
    BytesToNameCanonicalizer localBytesToNameCanonicalizer = paramBytesToNameCanonicalizer.makeChild(bool1, bool2);
    return new Utf8StreamParser(this._context, paramInt, this._in, paramObjectCodec, localBytesToNameCanonicalizer, this._inputBuffer, this._inputPtr, this._inputEnd, this._bufferRecyclable);
  }
  return new ReaderBasedParser(this._context, paramInt, constructReader(), paramObjectCodec, paramCharsToNameCanonicalizer.makeChild(bool1, bool2));
}
项目:ingress-indonesia-dev    文件:ReaderBasedParser.java   
public ReaderBasedParser(IOContext paramIOContext, int paramInt, Reader paramReader, ObjectCodec paramObjectCodec, CharsToNameCanonicalizer paramCharsToNameCanonicalizer)
{
  super(paramIOContext, paramInt);
  this._reader = paramReader;
  this._inputBuffer = paramIOContext.allocTokenBuffer();
  this._objectCodec = paramObjectCodec;
  this._symbols = paramCharsToNameCanonicalizer;
}
项目:ingress-indonesia-dev    文件:ByteSourceBootstrapper.java   
public final JsonParser constructParser(int paramInt, ObjectCodec paramObjectCodec, BytesToNameCanonicalizer paramBytesToNameCanonicalizer, CharsToNameCanonicalizer paramCharsToNameCanonicalizer)
{
  JsonEncoding localJsonEncoding = detectEncoding();
  boolean bool1 = JsonParser.Feature.CANONICALIZE_FIELD_NAMES.enabledIn(paramInt);
  boolean bool2 = JsonParser.Feature.INTERN_FIELD_NAMES.enabledIn(paramInt);
  if ((localJsonEncoding == JsonEncoding.UTF8) && (bool1))
  {
    BytesToNameCanonicalizer localBytesToNameCanonicalizer = paramBytesToNameCanonicalizer.makeChild(bool1, bool2);
    return new Utf8StreamParser(this._context, paramInt, this._in, paramObjectCodec, localBytesToNameCanonicalizer, this._inputBuffer, this._inputPtr, this._inputEnd, this._bufferRecyclable);
  }
  return new ReaderBasedParser(this._context, paramInt, constructReader(), paramObjectCodec, paramCharsToNameCanonicalizer.makeChild(bool1, bool2));
}
项目:12306-android-Decompile    文件:ReaderBasedParser.java   
public ReaderBasedParser(IOContext paramIOContext, int paramInt, Reader paramReader, ObjectCodec paramObjectCodec, CharsToNameCanonicalizer paramCharsToNameCanonicalizer)
{
  super(paramIOContext, paramInt, paramReader);
  this._objectCodec = paramObjectCodec;
  this._symbols = paramCharsToNameCanonicalizer;
}
项目:12306-android-Decompile    文件:ReaderBasedParser.java   
public ReaderBasedParser(IOContext paramIOContext, int paramInt, Reader paramReader, ObjectCodec paramObjectCodec, CharsToNameCanonicalizer paramCharsToNameCanonicalizer)
{
  super(paramIOContext, paramInt, paramReader);
  this._objectCodec = paramObjectCodec;
  this._symbols = paramCharsToNameCanonicalizer;
}