@API(value=Internal)
public class ExtensionRegistry
extends java.lang.Object
ExtensionRegistry holds all registered extensions (i.e.
instances of ExtensionPoint) for a given
Container or
Leaf.
A registry has a reference to its parent registry, and all lookups are performed first in the current registry itself and then in its parent and thereby all its ancestors.
ExtensionPointRegistry,
ExtensionRegistrar| Modifier and Type | Class and Description |
|---|---|
static class |
ExtensionRegistry.ApplicationOrder |
| Constructor and Description |
|---|
ExtensionRegistry() |
| Modifier and Type | Method and Description |
|---|---|
static ExtensionRegistry |
newRegistryFrom(ExtensionRegistry parentRegistry,
java.util.List<java.lang.Class<? extends org.junit.gen5.api.extension.Extension>> extensionTypes)
Factory for creating and populating a new registry from a list of
extension types and a parent registry.
|
void |
registerExtensionPoint(org.junit.gen5.api.extension.ExtensionPoint extension,
java.lang.Object source) |
<E extends org.junit.gen5.api.extension.ExtensionPoint> |
stream(java.lang.Class<E> extensionPointType,
ExtensionRegistry.ApplicationOrder order)
Return a stream for iterating over all registered extension points
of the specified type.
|
public static ExtensionRegistry newRegistryFrom(ExtensionRegistry parentRegistry, java.util.List<java.lang.Class<? extends org.junit.gen5.api.extension.Extension>> extensionTypes)
parentRegistry - the parent registry to be usedextensionTypes - the types of extensions to be registered in
the new registryExtensionRegistrypublic <E extends org.junit.gen5.api.extension.ExtensionPoint> java.util.stream.Stream<RegisteredExtensionPoint<E>> stream(java.lang.Class<E> extensionPointType, ExtensionRegistry.ApplicationOrder order)
extensionPointType - the type of ExtensionPoint to streamorder - the order in which to apply the extension points after sortingpublic void registerExtensionPoint(org.junit.gen5.api.extension.ExtensionPoint extension,
java.lang.Object source)