@Test public void testBuild() { MessageAnalyzer analyzer = new MessageAnalyzer("xx={}"); StringBuilder sb = new StringBuilder(); analyzer.build(sb, new Object[] { new byte[] { 1, 2 } }); assertTrue("xx=[1, 2]".equals(sb.toString())); }
public void build(StringBuilder sb, Object[] args) { for (Placeholder object : caches) { object.build(sb, args); } if (args.length > count) { for (int i = count; i < args.length; i++) { append(sb, ",{"); append(sb, i); append(sb, "}="); append(sb, args[i]); } } }
MessageAnalyzer { public void build(StringBuilder sb, Object[] args) { for (Placeholder object : caches) { object.build(sb, args); } if (args.length > count) { for (int i = count; i < args.length; i++) { append(sb, ",{"); append(sb, i); append(sb, "}="); append(sb, args[i]); } } } }
MessageAnalyzer { public void build(StringBuilder sb, Object[] args) { for (Placeholder object : caches) { object.build(sb, args); } if (args.length > count) { for (int i = count; i < args.length; i++) { append(sb, ",{"); append(sb, i); append(sb, "}="); append(sb, args[i]); } } } MessageAnalyzer(String key); }
MessageAnalyzer { public void build(StringBuilder sb, Object[] args) { for (Placeholder object : caches) { object.build(sb, args); } if (args.length > count) { for (int i = count; i < args.length; i++) { append(sb, ",{"); append(sb, i); append(sb, "}="); append(sb, args[i]); } } } MessageAnalyzer(String key); void build(StringBuilder sb, Object[] args); @Override String toString(); }
MessageAnalyzer { public void build(StringBuilder sb, Object[] args) { for (Placeholder object : caches) { object.build(sb, args); } if (args.length > count) { for (int i = count; i < args.length; i++) { append(sb, ",{"); append(sb, i); append(sb, "}="); append(sb, args[i]); } } } MessageAnalyzer(String key); void build(StringBuilder sb, Object[] args); @Override String toString();  }