Java 类org.codehaus.jackson.impl.Indenter 实例源码

项目:lens    文件:BaseLensCommand.java   
/**
 * Instantiates a new base lens command.
 */
public BaseLensCommand() {
  mapper = new ObjectMapper();
  mapper.setSerializationInclusion(Inclusion.NON_NULL);
  mapper.setSerializationInclusion(Inclusion.NON_DEFAULT);
  pp = new DefaultPrettyPrinter();
  pp.indentObjectsWith(new Indenter() {
    @Override
    public void writeIndentation(JsonGenerator jg, int level) throws IOException {
      jg.writeRaw("\n");
      for (int i = 0; i < level; i++) {
        jg.writeRaw(" ");
      }
    }

    @Override
    public boolean isInline() {
      return false;
    }
  });
}
项目:12306-android-Decompile    文件:DefaultPrettyPrinter.java   
public void indentArraysWith(Indenter paramIndenter)
{
  if (paramIndenter == null)
    paramIndenter = new NopIndenter();
  this._arrayIndenter = paramIndenter;
}
项目:12306-android-Decompile    文件:DefaultPrettyPrinter.java   
public void indentObjectsWith(Indenter paramIndenter)
{
  if (paramIndenter == null)
    paramIndenter = new NopIndenter();
  this._objectIndenter = paramIndenter;
}
项目:12306-android-Decompile    文件:DefaultPrettyPrinter.java   
public void indentArraysWith(Indenter paramIndenter)
{
  if (paramIndenter == null)
    paramIndenter = new NopIndenter();
  this._arrayIndenter = paramIndenter;
}
项目:12306-android-Decompile    文件:DefaultPrettyPrinter.java   
public void indentObjectsWith(Indenter paramIndenter)
{
  if (paramIndenter == null)
    paramIndenter = new NopIndenter();
  this._objectIndenter = paramIndenter;
}