Top Description Inners Fields Constructors Methods
org.junit.jupiter.engine.discovery

pack-priv abstract Class AbstractOrderingVisitor<PARENT extends TestDescriptor, CHILD extends TestDescriptor, WRAPPER extends AbstractAnnotatedDescriptorWrapper<?>>

extends Object
implements Visitor
Class Inheritance
All Implemented Interfaces
org.junit.platform.engine.TestDescriptor.Visitor
Known Direct Subclasses
org.junit.jupiter.engine.discovery.ClassOrderingVisitor, org.junit.jupiter.engine.discovery.MethodOrderingVisitor
Type Parameters
<PARENT>
the parent container type to search in for matching children
<CHILD>
the type of children (containers or tests) to order
<WRAPPER>
the wrapper type for the children to order
Static Imports
java.util.stream.Collectors.toCollection

Abstract base class for visitors that order children nodes.
Since
5.8

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class
protected static interface

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected void
doWithMatchingDescriptor(Class<PARENT> parentTestDescriptorType, TestDescriptor testDescriptor, Consumer<PARENT> action, Function<PARENT, String> errorMessageBuilder)

protected AbstractOrderingVisitor<PARENT, CHILD, WRAPPER>.DescriptorWrapperOrderer

Returns:

a new DescriptorWrapperOrderer or the one supplied as an argument
getDescriptorWrapperOrderer
(AbstractOrderingVisitor<PARENT, CHILD, WRAPPER>.DescriptorWrapperOrderer inheritedDescriptorWrapperOrderer, AbstractAnnotatedDescriptorWrapper<?> descriptorWrapper)

Get the DescriptorWrapperOrderer for the supplied AbstractAnnotatedDescriptorWrapper.

protected void
orderChildrenTestDescriptors(TestDescriptor parentTestDescriptor, Class<CHILD> matchingChildrenType, Function<CHILD, WRAPPER> descriptorWrapperFactory, AbstractOrderingVisitor<PARENT, CHILD, WRAPPER>.DescriptorWrapperOrderer descriptorWrapperOrderer)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

loggerback to summary
private static final Logger logger

Constructor Detail

AbstractOrderingVisitorback to summary
pack-priv AbstractOrderingVisitor()

Method Detail

doWithMatchingDescriptorback to summary
protected void doWithMatchingDescriptor(Class<PARENT> parentTestDescriptorType, TestDescriptor testDescriptor, Consumer<PARENT> action, Function<PARENT, String> errorMessageBuilder)
Annotations
@SuppressWarnings:unchecked
getDescriptorWrapperOrdererback to summary
protected AbstractOrderingVisitor<PARENT, CHILD, WRAPPER>.DescriptorWrapperOrderer getDescriptorWrapperOrderer(AbstractOrderingVisitor<PARENT, CHILD, WRAPPER>.DescriptorWrapperOrderer inheritedDescriptorWrapperOrderer, AbstractAnnotatedDescriptorWrapper<?> descriptorWrapper)

Get the DescriptorWrapperOrderer for the supplied AbstractAnnotatedDescriptorWrapper.

The default implementation returns the supplied DescriptorWrapperOrderer.

Returns:AbstractOrderingVisitor<PARENT, CHILD, WRAPPER>.DescriptorWrapperOrderer

a new DescriptorWrapperOrderer or the one supplied as an argument

orderChildrenTestDescriptorsback to summary
protected void orderChildrenTestDescriptors(TestDescriptor parentTestDescriptor, Class<CHILD> matchingChildrenType, Function<CHILD, WRAPPER> descriptorWrapperFactory, AbstractOrderingVisitor<PARENT, CHILD, WRAPPER>.DescriptorWrapperOrderer descriptorWrapperOrderer)
org.junit.jupiter.engine.discovery back to summary

protected Class AbstractOrderingVisitor.DescriptorWrapperOrderer

extends Object
Class Inheritance
  • java.lang.Object
  • org.junit.jupiter.engine.discovery.AbstractOrderingVisitor.DescriptorWrapperOrderer

Field Summary

Modifier and TypeField and Description
private final AbstractOrderingVisitor.MessageGenerator
private final AbstractOrderingVisitor.MessageGenerator
private final Consumer<List<WRAPPER>>

Constructor Summary

AccessConstructor and Description
pack-priv
DescriptorWrapperOrderer(Consumer<List<WRAPPER>> orderingAction, AbstractOrderingVisitor.MessageGenerator descriptorsAddedMessageGenerator, AbstractOrderingVisitor.MessageGenerator descriptorsRemovedMessageGenerator)

Method Summary

Modifier and TypeMethod and Description
private boolean
private void
private void
private void
orderWrappers(List<WRAPPER> wrappers)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

descriptorsAddedMessageGeneratorback to summary
private final AbstractOrderingVisitor.MessageGenerator descriptorsAddedMessageGenerator
descriptorsRemovedMessageGeneratorback to summary
private final AbstractOrderingVisitor.MessageGenerator descriptorsRemovedMessageGenerator
orderingActionback to summary
private final Consumer<List<WRAPPER>> orderingAction

Constructor Detail

DescriptorWrapperOrdererback to summary
pack-priv DescriptorWrapperOrderer(Consumer<List<WRAPPER>> orderingAction, AbstractOrderingVisitor.MessageGenerator descriptorsAddedMessageGenerator, AbstractOrderingVisitor.MessageGenerator descriptorsRemovedMessageGenerator)

Method Detail

canOrderWrappersback to summary
private boolean canOrderWrappers()
logDescriptorsAddedWarningback to summary
private void logDescriptorsAddedWarning(int number)
logDescriptorsRemovedWarningback to summary
private void logDescriptorsRemovedWarning(int number)
orderWrappersback to summary
private void orderWrappers(List<WRAPPER> wrappers)
org.junit.jupiter.engine.discovery back to summary

protected Interface AbstractOrderingVisitor.MessageGenerator

Annotations
@FunctionalInterface

Method Summary

Modifier and TypeMethod and Description
public String
generateMessage(int number)

Method Detail

generateMessageback to summary
public String generateMessage(int number)