Top Description Inners Fields Constructors Methods
org.junit.jupiter.params.support

public final Class AnnotationConsumerInitializer

extends Object
Class Inheritance
Annotations
@API
status:INTERNAL
since:5.0
Static Imports
java.util.Arrays.asList, .Collections.emptyList, org.apiguardian.api.API.Status.INTERNAL, org.junit.platform.commons.support.AnnotationSupport.findAnnotation, .AnnotationSupport.findRepeatableAnnotations, .HierarchyTraversalMode.BOTTOM_UP, .ReflectionSupport.findMethods

AnnotationConsumerInitializer is an internal helper class for initializing AnnotationConsumers.
Since
5.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static record

Field Summary

Modifier and TypeField and Description
private static final List<AnnotationConsumerInitializer.AnnotationConsumingMethodSignature>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static <T extends Annotation> List<T>
findAnnotations(AnnotatedElement annotatedElement, Class<T> annotationType)

private static <T> Class<? extends Annotation>
findConsumedAnnotationType(T annotationConsumerInstance)

private static Class<? extends Annotation>
public static <T> T
initialize(AnnotatedElement annotatedElement, T annotationConsumerInstance)

private static <A extends Annotation> void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

annotationConsumingMethodSignaturesback to summary
private static final List<AnnotationConsumerInitializer.AnnotationConsumingMethodSignature> annotationConsumingMethodSignatures

Constructor Detail

AnnotationConsumerInitializerback to summary
private AnnotationConsumerInitializer()

Method Detail

findAnnotationsback to summary
private static <T extends Annotation> List<T> findAnnotations(AnnotatedElement annotatedElement, Class<T> annotationType)
findConsumedAnnotationTypeback to summary
private static <T> Class<? extends Annotation> findConsumedAnnotationType(T annotationConsumerInstance)
getAnnotationTypeback to summary
private static Class<? extends Annotation> getAnnotationType(Method method)
Annotations
@SuppressWarnings:unchecked
initializeback to summary
public static <T> T initialize(AnnotatedElement annotatedElement, T annotationConsumerInstance)
Annotations
@SuppressWarnings:unchecked, rawtypes
initializeAnnotationConsumerback to summary
private static <A extends Annotation> void initializeAnnotationConsumer(AnnotationConsumer<A> instance, A annotation)
org.junit.jupiter.params.support back to summary

private final Record AnnotationConsumerInitializer.AnnotationConsumingMethodSignature

extends Record
Class Inheritance
Record Components
methodName:String 
parameterCount:int 
annotationParameterIndex:int 

Field Summary

Modifier and TypeField and Description
private final int
private final String
methodName

Record Component accessed by methodName().

private final int
parameterCount

Record Component accessed by parameterCount().

Constructor Summary

AccessConstructor and Description
private
AnnotationConsumingMethodSignature(String methodName, int parameterCount, int annotationParameterIndex)

Method Summary

Modifier and TypeMethod and Description
public int
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.

pack-priv boolean
public String
methodName()

Record Component getter of methodName.

public int
parameterCount()

Record Component getter of parameterCount.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

annotationParameterIndexback to summary
private final int annotationParameterIndex

Record Component accessed by annotationParameterIndex().

methodNameback to summary
private final String methodName

Record Component accessed by methodName().

parameterCountback to summary
private final int parameterCount

Record Component accessed by parameterCount().

Constructor Detail

AnnotationConsumingMethodSignatureback to summary
private AnnotationConsumingMethodSignature(String methodName, int parameterCount, int annotationParameterIndex)

Method Detail

annotationParameterIndexback to summary
public int annotationParameterIndex()

Record Component getter of annotationParameterIndex.

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.

isMatchingWithback to summary
pack-priv boolean isMatchingWith(Method method)
methodNameback to summary
public String methodName()

Record Component getter of methodName.

parameterCountback to summary
public int parameterCount()

Record Component getter of parameterCount.

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.