AbstractLoggerFactory implements LoggerFactory { protected String makeNameFrom(Class<?> binding) { requireNonNull(binding); final String[] tokens = binding.getName().split("\\."); final StringBuilder sb = new StringBuilder(); for (int i = 0; i < tokens.length; i++) { if (i == tokens.length - 1) { sb.append(tokens[i]); } else { sb.append(tokens[i].charAt(0)).append('.'); } } return sb.toString(); } AbstractLoggerFactory(); @Override Logger create(Class<?> binding); @Override Logger create(String binding); @Override synchronized void setFormatter(LoggerFormatter formatter); @Override synchronized LoggerFormatter getFormatter(); abstract Logger make(String binding, LoggerFormatter formatter); @Override void addListener(LoggerEventListener listener); @Override void removeListener(LoggerEventListener listener); @Override Stream<LoggerEventListener> listeners(); @Override Stream<Entry<String, Logger>> loggers(); @Override void setLevel(String path, Level level); @Override void setLevel(Class<?> binding, Level level);  }
@Test void makeNameFrom() { assertEquals("c.s.c.l.i.AbstractLoggerFactoryTest", instance.makeNameFrom(AbstractLoggerFactoryTest.class)); }