Class AbstractOrderingVisitor<PARENT extends TestDescriptor,CHILD extends TestDescriptor,WRAPPER extends AbstractAnnotatedDescriptorWrapper<?>>
- java.lang.Object
-
- org.junit.jupiter.engine.discovery.AbstractOrderingVisitor<PARENT,CHILD,WRAPPER>
-
- Type Parameters:
PARENT
- the parent container type to search in for matching childrenCHILD
- the type of children (containers or tests) to orderWRAPPER
- the wrapper type for the children to order
- All Implemented Interfaces:
TestDescriptor.Visitor
- Direct Known Subclasses:
ClassOrderingVisitor
,MethodOrderingVisitor
abstract class AbstractOrderingVisitor<PARENT extends TestDescriptor,CHILD extends TestDescriptor,WRAPPER extends AbstractAnnotatedDescriptorWrapper<?>> extends java.lang.Object implements TestDescriptor.Visitor
Abstract base class for visitors that order children nodes.- Since:
- 5.8
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AbstractOrderingVisitor.DescriptorWrapperOrderer
protected static interface
AbstractOrderingVisitor.MessageGenerator
-
Field Summary
Fields Modifier and Type Field Description private static org.junit.platform.commons.logging.Logger
logger
-
Constructor Summary
Constructors Constructor Description AbstractOrderingVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doWithMatchingDescriptor(java.lang.Class<PARENT> parentTestDescriptorType, TestDescriptor testDescriptor, java.util.function.Consumer<PARENT> action, java.util.function.Function<PARENT,java.lang.String> errorMessageBuilder)
protected AbstractOrderingVisitor.DescriptorWrapperOrderer
getDescriptorWrapperOrderer(AbstractOrderingVisitor.DescriptorWrapperOrderer inheritedDescriptorWrapperOrderer, AbstractAnnotatedDescriptorWrapper<?> descriptorWrapper)
Get theAbstractOrderingVisitor.DescriptorWrapperOrderer
for the suppliedAbstractAnnotatedDescriptorWrapper
.protected void
orderChildrenTestDescriptors(TestDescriptor parentTestDescriptor, java.lang.Class<CHILD> matchingChildrenType, java.util.function.Function<CHILD,WRAPPER> descriptorWrapperFactory, AbstractOrderingVisitor.DescriptorWrapperOrderer descriptorWrapperOrderer)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.junit.platform.engine.TestDescriptor.Visitor
visit
-
-
-
-
Method Detail
-
doWithMatchingDescriptor
protected void doWithMatchingDescriptor(java.lang.Class<PARENT> parentTestDescriptorType, TestDescriptor testDescriptor, java.util.function.Consumer<PARENT> action, java.util.function.Function<PARENT,java.lang.String> errorMessageBuilder)
-
orderChildrenTestDescriptors
protected void orderChildrenTestDescriptors(TestDescriptor parentTestDescriptor, java.lang.Class<CHILD> matchingChildrenType, java.util.function.Function<CHILD,WRAPPER> descriptorWrapperFactory, AbstractOrderingVisitor.DescriptorWrapperOrderer descriptorWrapperOrderer)
-
getDescriptorWrapperOrderer
protected AbstractOrderingVisitor.DescriptorWrapperOrderer getDescriptorWrapperOrderer(AbstractOrderingVisitor.DescriptorWrapperOrderer inheritedDescriptorWrapperOrderer, AbstractAnnotatedDescriptorWrapper<?> descriptorWrapper)
Get theAbstractOrderingVisitor.DescriptorWrapperOrderer
for the suppliedAbstractAnnotatedDescriptorWrapper
.The default implementation returns the supplied
DescriptorWrapperOrderer
.- Returns:
- a new
DescriptorWrapperOrderer
or the one supplied as an argument
-
-