Top Inners Constructors Methods
org.junit.jupiter.engine.execution

public Class InvocationInterceptorChain

extends Object
Class Inheritance
Annotations
@API
status:INTERNAL
since:5.5
Static Imports
java.util.stream.Collectors.joining, org.apiguardian.api.API.Status.INTERNAL

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static record
public static interface
private static class
public static interface

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private <T> T
private <T> InvocationInterceptor.Invocation<T>
public <T extends @Nullable Object> T
private <T> T
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

InvocationInterceptorChainback to summary
public InvocationInterceptorChain()

Method Detail

chainAndInvokeback to summary
private <T> T chainAndInvoke(InvocationInterceptor.Invocation<T> invocation, InvocationInterceptorChain.InterceptorCall<T> call, List<InvocationInterceptor> interceptors)
chainInterceptorsback to summary
private <T> InvocationInterceptor.Invocation<T> chainInterceptors(InvocationInterceptor.Invocation<T> invocation, InvocationInterceptorChain.InterceptorCall<T> call, List<InvocationInterceptor> interceptors)
invokeback to summary
public <T extends @Nullable Object> T invoke(InvocationInterceptor.Invocation<T> invocation, ExtensionRegistry extensionRegistry, InvocationInterceptorChain.InterceptorCall<T> call)
proceedback to summary
private <T> T proceed(InvocationInterceptor.Invocation<T> invocation)
org.junit.jupiter.engine.execution back to summary

private final Record InvocationInterceptorChain.InterceptedInvocation<T>

extends Record
implements InvocationInterceptor.Invocation<T>
Class Inheritance
All Implemented Interfaces
org.junit.jupiter.api.extension.InvocationInterceptor.Invocation
Record Components
invocation:InvocationInterceptor.Invocation<T> 
call:InvocationInterceptorChain.InterceptorCall<T> 
interceptor:InvocationInterceptor 

Field Summary

Modifier and TypeField and Description
private final InvocationInterceptorChain.InterceptorCall<T>
call

Record Component accessed by call().

private final InvocationInterceptor
interceptor

Record Component accessed by interceptor().

private final InvocationInterceptor.Invocation<T>
invocation

Record Component accessed by invocation().

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public InvocationInterceptorChain.InterceptorCall<T>
call()

Record Component getter of call.

public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public InvocationInterceptor
interceptor()

Record Component getter of interceptor.

public InvocationInterceptor.Invocation<T>
invocation()

Record Component getter of invocation.

public T
public void
skip()

Overrides default org.junit.jupiter.api.extension.InvocationInterceptor.Invocation.skip.

Explicitly skip this invocation.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

callback to summary
private final InvocationInterceptorChain.InterceptorCall<T> call

Record Component accessed by call().

interceptorback to summary
private final InvocationInterceptor interceptor

Record Component accessed by interceptor().

invocationback to summary
private final InvocationInterceptor.Invocation<T> invocation

Record Component accessed by invocation().

Constructor Detail

InterceptedInvocationback to summary
private InterceptedInvocation(InvocationInterceptor.Invocation<T> invocation, InvocationInterceptorChain.InterceptorCall<T> call, InvocationInterceptor interceptor)

Method Detail

callback to summary
public InvocationInterceptorChain.InterceptorCall<T> call()

Record Component getter of call.

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

interceptorback to summary
public InvocationInterceptor interceptor()

Record Component getter of interceptor.

invocationback to summary
public InvocationInterceptor.Invocation<T> invocation()

Record Component getter of invocation.

proceedback to summary
public T proceed() throws Throwable

Implements org.junit.jupiter.api.extension.InvocationInterceptor.Invocation.proceed.

Doc from org.junit.jupiter.api.extension.InvocationInterceptor.Invocation.proceed.

Proceed with this invocation.

Annotations
@Override
Exceptions
Throwable:
in case the invocation failed
skipback to summary
public void skip()

Overrides default org.junit.jupiter.api.extension.InvocationInterceptor.Invocation.skip.

Doc from org.junit.jupiter.api.extension.InvocationInterceptor.Invocation.skip.

Explicitly skip this invocation.

This allows to bypass the check that proceed() must be called at least once. The default implementation does nothing.

Annotations
@Override
toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

org.junit.jupiter.engine.execution back to summary

public Interface InvocationInterceptorChain.InterceptorCall<T extends @Nullable Object>

Annotations
@FunctionalInterface

Method Summary

Modifier and TypeMethod and Description
public T
public static InvocationInterceptorChain.InterceptorCall<@Nullable Void>

Method Detail

applyback to summary
public T apply(InvocationInterceptor interceptor, InvocationInterceptor.Invocation<T> invocation) throws Throwable
ofVoidback to summary
public static InvocationInterceptorChain.InterceptorCall<@Nullable Void> ofVoid(InvocationInterceptorChain.VoidInterceptorCall call)
org.junit.jupiter.engine.execution back to summary

private Class InvocationInterceptorChain.ValidatingInvocation<T extends @Nullable Object>

extends Object
implements InvocationInterceptor.Invocation<T extends @Nullable Object>
Class Inheritance
  • java.lang.Object
  • org.junit.jupiter.engine.execution.InvocationInterceptorChain.ValidatingInvocation
All Implemented Interfaces
org.junit.jupiter.api.extension.InvocationInterceptor.Invocation

Field Summary

Modifier and TypeField and Description
private final InvocationInterceptor.Invocation<T>
private final List<InvocationInterceptor>
private final AtomicBoolean
private static final Logger

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
fail(String prefix)

private void
public T
public void
skip()

Overrides default org.junit.jupiter.api.extension.InvocationInterceptor.Invocation.skip.

Explicitly skip this invocation.

pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private final InvocationInterceptor.Invocation<T> delegate
interceptorsback to summary
private final List<InvocationInterceptor> interceptors
invokedOrSkippedback to summary
private final AtomicBoolean invokedOrSkipped
loggerback to summary
private static final Logger logger

Constructor Detail

ValidatingInvocationback to summary
pack-priv ValidatingInvocation(InvocationInterceptor.Invocation<T> delegate, List<InvocationInterceptor> interceptors)

Method Detail

failback to summary
private void fail(String prefix)
markInvokedOrSkippedback to summary
private void markInvokedOrSkipped()
proceedback to summary
public T proceed() throws Throwable

Implements org.junit.jupiter.api.extension.InvocationInterceptor.Invocation.proceed.

Doc from org.junit.jupiter.api.extension.InvocationInterceptor.Invocation.proceed.

Proceed with this invocation.

Annotations
@Override
Exceptions
Throwable:
in case the invocation failed
skipback to summary
public void skip()

Overrides default org.junit.jupiter.api.extension.InvocationInterceptor.Invocation.skip.

Doc from org.junit.jupiter.api.extension.InvocationInterceptor.Invocation.skip.

Explicitly skip this invocation.

This allows to bypass the check that proceed() must be called at least once. The default implementation does nothing.

Annotations
@Override
verifyInvokedAtLeastOnceback to summary
pack-priv void verifyInvokedAtLeastOnce()
org.junit.jupiter.engine.execution back to summary

public Interface InvocationInterceptorChain.VoidInterceptorCall

Annotations
@FunctionalInterface

Method Summary

Modifier and TypeMethod and Description
public void

Method Detail

applyback to summary
public void apply(InvocationInterceptor interceptor, InvocationInterceptor.Invocation<@Nullable Void> invocation) throws Throwable