GH-102 - ApplicationModules now allows traversing modules in topological order.
We now optionally integrate with the JGraphT library to calculate the topological order of modules based on their dependency structure. That order is then exposed in ApplicationModules' iteration and via ….getComparator(). Renamed FormattableJavaClass to FormattableType and allow it to be created from a plain Class as well.
This commit is contained in:
@@ -23,7 +23,7 @@ import java.util.Arrays;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
import org.springframework.aop.ProxyMethodInvocation;
|
||||
import org.springframework.aop.framework.Advised;
|
||||
import org.springframework.modulith.model.FormatableJavaClass;
|
||||
import org.springframework.modulith.model.FormatableType;
|
||||
import org.springframework.modulith.model.ApplicationModule;
|
||||
import org.springframework.modulith.model.ApplicationModules;
|
||||
import org.springframework.modulith.model.SpringBean;
|
||||
@@ -132,8 +132,8 @@ class DefaultObservedModule implements ObservedModule {
|
||||
private static String toString(Class<?> type, Method method, ApplicationModule module) {
|
||||
|
||||
String typeName = module.getType(type.getName())
|
||||
.map(FormatableJavaClass::of)
|
||||
.map(FormatableJavaClass::getAbbreviatedFullName)
|
||||
.map(FormatableType::of)
|
||||
.map(FormatableType::getAbbreviatedFullName)
|
||||
.orElseGet(() -> type.getName());
|
||||
|
||||
return String.format("%s.%s(…)", typeName, method.getName());
|
||||
|
||||
Reference in New Issue
Block a user