Debian Codegraph @

junit-jupiter-api/src/main/java/org/junit/jupiter/api/ClassOrdererContext.java

raw symbols SCIP
1 /*
2 * Copyright 2015-2024 the original author or authors.
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v2.0 which
6 * accompanies this distribution and is available at
7 *
8 * https://www.eclipse.org/legal/epl-v20.html
9 */
10
11 package org.junit.jupiter.api;
12
13 import static org.apiguardian.api.API.Status.STABLE;
14
15 import java.util.List;
16 import java.util.Optional;
17
18 import org.apiguardian.api.API;
19
20 /**
21 * {@code ClassOrdererContext} encapsulates the <em>context</em> in which
22 * a {@link ClassOrderer} will be invoked.
23 *
24 * @since 5.8
25 * @see ClassOrderer
26 * @see ClassDescriptor
27 */
28 @API(status = STABLE, since = "5.10")
29 public interface ClassOrdererContext {
30
31 /**
32 * Get the list of {@linkplain ClassDescriptor class descriptors} to
33 * order.
34 *
35 * @return the list of class descriptors; never {@code null}
36 */
37 List<? extends ClassDescriptor> getClassDescriptors();
38
39 /**
40 * Get the configuration parameter stored under the specified {@code key}.
41 *
42 * <p>If no such key is present in the {@code ConfigurationParameters} for
43 * the JUnit Platform, an attempt will be made to look up the value as a
44 * JVM system property. If no such system property exists, an attempt will
45 * be made to look up the value in the JUnit Platform properties file.
46 *
47 * @param key the key to look up; never {@code null} or blank
48 * @return an {@code Optional} containing the value; never {@code null}
49 * but potentially empty
50 *
51 * @see System#getProperty(String)
52 * @see org.junit.platform.engine.ConfigurationParameters
53 */
54 Optional<String> getConfigurationParameter(String key);
55
56 }