org.fusesource.jansi.Ansi.format()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中org.fusesource.jansi.Ansi.format()方法的一些代码示例,展示了Ansi.format()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ansi.format()方法的具体详情如下:
包路径:org.fusesource.jansi.Ansi
类名称:Ansi
方法名:format

Ansi.format介绍

暂无

代码示例

代码示例来源:origin: org.apache.maven.shared/maven-shared-utils

public AnsiMessageBuilder format( String pattern, Object... args )
{
  ansi.format( pattern, args );
  return this;
}

代码示例来源:origin: org.apache.maven.plugins/maven-surefire-report-plugin

public AnsiMessageBuilder format( String pattern, Object... args )
{
  ansi.format( pattern, args );
  return this;
}

代码示例来源:origin: CorfuDB/CorfuDB

/** Print a list of the active threads.
 *
 */
protected void printThreads() {
  System.out.println(ansi().fgCyan().bold().a("Active Threads At Test Failure")
    .reset());
  System.out.println(ansi().format("%-40s %s",
    "Thread name", "Method"));
  Map<Thread, StackTraceElement[]> threads = Thread.getAllStackTraces();
  threads.entrySet().forEach(e -> {
    // Don't print the current thread.
    if (!e.getKey().equals(Thread.currentThread())) {
      if (e.getValue().length > 0) {
        System.out.println(ansi().format("%-40s %s:%s",
          e.getKey().getName(),
          e.getValue()[0].getClassName(),
          e.getValue()[0].getMethodName()));
      } else {
        System.out.println(ansi().format("%-40s (no trace available)",
          e.getKey().getName()));
      }
    }
  });
}

代码示例来源:origin: zanata/zanata-platform

break;
ansi = ansi.format(format, args);
if (mode == DisplayMode.Confirmation) {
  ansi = ansi.a(NEW_LINE);

代码示例来源:origin: org.zanata/zanata-client-commands

break;
ansi = ansi.format(format, args);
if (mode == DisplayMode.Confirmation) {
  ansi = ansi.a(NEW_LINE);

相关文章