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 stores (if session data does not contain yet) prioritized components under certain key into given session.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 stores (if session data does not contain yet) prioritized components under certain key into given session. Same session is used to configure prioritized components, so priority sorted components during session are immutable and reusable.The
componentsare expected to be Sisu injectedMap<String,-like 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.C> - Since:
- 2.0.0
-
add
-
isEmpty
-
getAll
-
getEnabled
-
list
-
toString
-