1414import static java .util .stream .Collectors .toCollection ;
1515import static java .util .stream .Collectors .toSet ;
1616import static org .apiguardian .api .API .Status .INTERNAL ;
17- import static org .apiguardian .api .API .Status .STABLE ;
1817import static org .junit .platform .commons .util .ReflectionUtils .HierarchyTraversalMode .BOTTOM_UP ;
1918import static org .junit .platform .commons .util .ReflectionUtils .HierarchyTraversalMode .TOP_DOWN ;
2019
@@ -1107,7 +1106,10 @@ public static List<Class<?>> findNestedClasses(Class<?> clazz, Predicate<Class<?
11071106 return findNestedClasses (clazz , predicate , CycleErrorHandling .THROW_EXCEPTION );
11081107 }
11091108
1110- @ API (status = INTERNAL , since = "5.13.2" )
1109+ /**
1110+ * @since 1.13.2
1111+ */
1112+ @ API (status = INTERNAL , since = "1.13.2" )
11111113 public static List <Class <?>> findNestedClasses (Class <?> clazz , Predicate <Class <?>> predicate ,
11121114 CycleErrorHandling errorHandling ) {
11131115 Preconditions .notNull (clazz , "Class must not be null" );
@@ -1136,6 +1138,7 @@ public static List<Class<?>> findNestedClasses(Class<?> clazz, Predicate<Class<?
11361138 * checked; never {@code null}
11371139 * @return {@code true} if such a nested class is present
11381140 * @throws JUnitException if a cycle is detected within an inner class hierarchy
1141+ * @since 1.13.2
11391142 */
11401143 @ API (status = INTERNAL , since = "1.13.2" )
11411144 public static boolean isNestedClassPresent (Class <?> clazz , Predicate <Class <?>> predicate ,
@@ -1150,14 +1153,18 @@ public static boolean isNestedClassPresent(Class<?> clazz, Predicate<Class<?>> p
11501153 }
11511154
11521155 /**
1153- * since 1.10
1156+ * @ since 1.10
11541157 * @see org.junit.platform.commons.support.ReflectionSupport#streamNestedClasses(Class, Predicate)
11551158 */
1159+ @ API (status = INTERNAL , since = "1.10" )
11561160 public static Stream <Class <?>> streamNestedClasses (Class <?> clazz , Predicate <Class <?>> predicate ) {
11571161 return findNestedClasses (clazz , predicate ).stream ();
11581162 }
11591163
1160- @ API (status = INTERNAL , since = "5.13.2" )
1164+ /**
1165+ * @since 1.13.2
1166+ */
1167+ @ API (status = INTERNAL , since = "1.13.2" )
11611168 public static Stream <Class <?>> streamNestedClasses (Class <?> clazz , Predicate <Class <?>> predicate ,
11621169 CycleErrorHandling errorHandling ) {
11631170 return findNestedClasses (clazz , predicate , errorHandling ).stream ();
@@ -1312,6 +1319,7 @@ public static List<Field> findFields(Class<?> clazz, Predicate<Field> predicate,
13121319 * @since 1.10
13131320 * @see org.junit.platform.commons.support.ReflectionSupport#streamFields(Class, Predicate, org.junit.platform.commons.support.HierarchyTraversalMode)
13141321 */
1322+ @ API (status = INTERNAL , since = "1.10" )
13151323 public static Stream <Field > streamFields (Class <?> clazz , Predicate <Field > predicate ,
13161324 HierarchyTraversalMode traversalMode ) {
13171325
@@ -1453,6 +1461,9 @@ public static Optional<Method> findMethod(Class<?> clazz, String methodName, @Nu
14531461 return findMethod (clazz , methodName , resolveParameterTypes (clazz , methodName , parameterTypeNames ));
14541462 }
14551463
1464+ /**
1465+ * @since 1.10
1466+ */
14561467 @ API (status = INTERNAL , since = "1.10" )
14571468 public static Class <?>[] resolveParameterTypes (Class <?> clazz , String methodName ,
14581469 @ Nullable String parameterTypeNames ) {
@@ -1539,7 +1550,7 @@ private static Optional<Method> findMethod(Class<?> clazz, Predicate<Method> pre
15391550 * @since 1.7
15401551 * @see #findMethod(Class, String, Class...)
15411552 */
1542- @ API (status = STABLE , since = "1.7" )
1553+ @ API (status = INTERNAL , since = "1.7" )
15431554 public static Method getRequiredMethod (Class <?> clazz , String methodName , Class <?>... parameterTypes ) {
15441555 return ReflectionUtils .findMethod (clazz , methodName , parameterTypes ).orElseThrow (() -> new JUnitException (
15451556 "Could not find method [%s] in class [%s]" .formatted (methodName , clazz .getName ())));
@@ -1575,6 +1586,7 @@ public static List<Method> findMethods(Class<?> clazz, Predicate<Method> predica
15751586 * @since 1.10
15761587 * @see org.junit.platform.commons.support.ReflectionSupport#streamMethods(Class, Predicate, org.junit.platform.commons.support.HierarchyTraversalMode)
15771588 */
1589+ @ API (status = INTERNAL , since = "1.10" )
15781590 public static Stream <Method > streamMethods (Class <?> clazz , Predicate <Method > predicate ,
15791591 HierarchyTraversalMode traversalMode ) {
15801592
@@ -1886,6 +1898,9 @@ private static boolean isGeneric(Type type) {
18861898 return type instanceof TypeVariable || type instanceof GenericArrayType ;
18871899 }
18881900
1901+ /**
1902+ * @since 1.11
1903+ */
18891904 @ API (status = INTERNAL , since = "1.11" )
18901905 @ SuppressWarnings ("deprecation" ) // "AccessibleObject.isAccessible()" is deprecated in Java 9
18911906 public static <T extends Executable > T makeAccessible (T executable ) {
@@ -1895,6 +1910,9 @@ public static <T extends Executable> T makeAccessible(T executable) {
18951910 return executable ;
18961911 }
18971912
1913+ /**
1914+ * @since 1.12
1915+ */
18981916 @ API (status = INTERNAL , since = "1.12" )
18991917 @ SuppressWarnings ("deprecation" ) // "AccessibleObject.isAccessible()" is deprecated in Java 9
19001918 public static Field makeAccessible (Field field ) {
@@ -1958,7 +1976,10 @@ static Throwable getUnderlyingCause(Throwable t) {
19581976 return t ;
19591977 }
19601978
1961- @ API (status = INTERNAL , since = "5.13.2" )
1979+ /**
1980+ * @since 1.13.2
1981+ */
1982+ @ API (status = INTERNAL , since = "1.13.2" )
19621983 public enum CycleErrorHandling {
19631984
19641985 THROW_EXCEPTION {
0 commit comments