Package org.eclipse.aether.internal.impl
Class PrioritizedComponents<T>
java.lang.Object
org.eclipse.aether.internal.impl.PrioritizedComponents<T>
- Type Parameters:
T- The component type.
Helps to sort pluggable components by their priority.
-
Method Summary
Modifier and TypeMethodDescriptionvoidgetAll()booleanisEmpty()voidlist(StringBuilder buffer) static <C> PrioritizedComponents<C> reuseOrCreate(org.eclipse.aether.RepositorySystemSession session, Class<C> discriminator, Map<String, C> components, Function<C, Float> priorityFunction) Reuses or creates and caches (if session is equipped with cache, and it does not contain it yet) prioritized components under certain key into session cache.toString()
-
Method Details
-
reuseOrCreate
public static <C> PrioritizedComponents<C> reuseOrCreate(org.eclipse.aether.RepositorySystemSession session, Class<C> discriminator, Map<String, C> components, Function<C, Float> priorityFunction) Reuses or creates and caches (if session is equipped with cache, and it does not contain it yet) prioritized components under certain key into session cache. Same session is used to configure prioritized components, so priority sorted components during session are immutable and reusable (ifcomponentscomponent map is unchanged).The
componentsare expected to be Sisu injectedMap-like dynamic component maps. There is a simple "change detection" in place, as injected maps are dynamic, they are atomically expanded or contracted as components are dynamically discovered or unloaded.- Since:
- 2.0.0
-
add
-
isEmpty
-
getAll
-
getEnabled
-
list
-
toString
-