Returns the String that would appear in an error message for this chain of classes as modules.
(Class<?>... classes)
| 54 | * Returns the String that would appear in an error message for this chain of classes as modules. |
| 55 | */ |
| 56 | public static String asModuleChain(Class<?>... classes) { |
| 57 | return Joiner.on(" -> ") |
| 58 | .appendTo( |
| 59 | new StringBuilder(" (via modules: "), |
| 60 | Iterables.transform(ImmutableList.copyOf(classes), Class::getName)) |
| 61 | .append(")") |
| 62 | .toString(); |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * Returns the source file appears in error messages based on {@link |