Package io.activej.inject.util
Class Utils
java.lang.Object
io.activej.inject.util.Utils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,V> void combineMultimap(Map<K, Set<V>> accumulator, Map<K, Set<V>> multimap) static Stringstatic StringgetDisplayString(Class<? extends Annotation> annotationType, @Nullable Annotation annotation) static StringgetDisplayString(Object object) static intgetKeyDisplayCenter(Key<?> key) static StringgetLocation(@Nullable Binding<?> binding) static StringgetScopeDisplayString(Scope[] scope) static booleanisMarker(Class<? extends Annotation> annotationType) static StringMakes a GraphViz graph representation of the binding graph.static voidmergeMultibinders(Map<Key<?>, Multibinder<?>> into, Map<Key<?>, Multibinder<?>> from) static <T> T[]next(T[] items, T item) static <K,V> Map<K, V> static voidA shortcut for printing the result ofmakeGraphVizGraph(io.activej.inject.util.Trie<io.activej.inject.Scope, java.util.Map<io.activej.inject.Key<?>, io.activej.inject.binding.Binding<?>>>)into the standard output.static <T> LinkedHashMap<KeyPattern<?>,Set<T>> sortPatternsMap(Map<KeyPattern<?>, Set<T>> map) static <K,V> Map<K, V> squash(Map<K, Set<V>> multimap, BiFunction<K, Set<V>, V> squasher) toMultimap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper)
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
bindingMultimapMerger
-
next
public static <T> T[] next(T[] items, T item) -
getScopeDisplayString
-
mergeMultibinders
public static void mergeMultibinders(Map<Key<?>, Multibinder<?>> into, Map<Key<?>, Multibinder<?>> from) -
combineMultimap
-
override
-
toMultimap
-
squash
-
getLocation
-
printGraphVizGraph
A shortcut for printing the result ofmakeGraphVizGraph(io.activej.inject.util.Trie<io.activej.inject.Scope, java.util.Map<io.activej.inject.Key<?>, io.activej.inject.binding.Binding<?>>>)into the standard output. -
makeGraphVizGraph
Makes a GraphViz graph representation of the binding graph. Scopes are grouped nicely into subgraph boxes and dependencies are properly drawn from lower to upper scopes. -
getKeyDisplayCenter
-
getDisplayString
public static String getDisplayString(Class<? extends Annotation> annotationType, @Nullable @Nullable Annotation annotation) -
getDisplayString
-
drawCycle
-
isMarker
-
sortPatternsMap
public static <T> LinkedHashMap<KeyPattern<?>,Set<T>> sortPatternsMap(Map<KeyPattern<?>, Set<T>> map)
-