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 TypeMethodDescriptionvoid
getAll()
boolean
isEmpty()
void
list
(StringBuilder buffer) static <C> PrioritizedComponents
<C> reuseOrCreate
(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(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
components
are 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
-