@Test public void testThatAllTypesAndMethodsAreCollectedFromObject() { Assertions.assertEquals("{\n" + " \"equals(Object)\" -> equals\n" + " \"getClass()\" -> getClass\n" + " \"hashCode()\" -> hashCode\n" + " \"notify()\" -> notify\n" + " \"notifyAll()\" -> notifyAll\n" + " \"toString()\" -> toString\n" + " \"wait() throws java.lang.InterruptedException\" -> wait\n" + " \"wait(long) throws java.lang.InterruptedException\" -> wait\n" + " \"wait(long,int) throws java.lang.InterruptedException\" -> wait\n" + "}", new MethodCollection(Object.class).toString()); }
@Override public String toString() { var s = new StringBuilder(); s.append("{\n"); for (var key : new TreeSet<>(methodMap.keySet())) { s.append(" \"").append(key).append("\" -> ").append(methodMap.get(key).method.getName()).append("\n"); } s.append("}"); return s.toString(); }
MethodCollection { @Override public String toString() { var s = new StringBuilder(); s.append("{\n"); for (var key : new TreeSet<>(methodMap.keySet())) { s.append(" \"").append(key).append("\" -> ").append(methodMap.get(key).method.getName()).append("\n"); } s.append("}"); return s.toString(); } }
MethodCollection { @Override public String toString() { var s = new StringBuilder(); s.append("{\n"); for (var key : new TreeSet<>(methodMap.keySet())) { s.append(" \"").append(key).append("\" -> ").append(methodMap.get(key).method.getName()).append("\n"); } s.append("}"); return s.toString(); } MethodCollection(Class<?> klass); }
MethodCollection { @Override public String toString() { var s = new StringBuilder(); s.append("{\n"); for (var key : new TreeSet<>(methodMap.keySet())) { s.append(" \"").append(key).append("\" -> ").append(methodMap.get(key).method.getName()).append("\n"); } s.append("}"); return s.toString(); } MethodCollection(Class<?> klass); boolean needWrapperInterface(); Set<String> methodSignatures(); Method get(String name); Boolean isExitNode(String name); void include(String method); void exclude(String method); Boolean isFluentNode(String name); void exitNode(String name); @Override String toString(); }
MethodCollection { @Override public String toString() { var s = new StringBuilder(); s.append("{\n"); for (var key : new TreeSet<>(methodMap.keySet())) { s.append(" \"").append(key).append("\" -> ").append(methodMap.get(key).method.getName()).append("\n"); } s.append("}"); return s.toString(); } MethodCollection(Class<?> klass); boolean needWrapperInterface(); Set<String> methodSignatures(); Method get(String name); Boolean isExitNode(String name); void include(String method); void exclude(String method); Boolean isFluentNode(String name); void exitNode(String name); @Override String toString();  }