Skip to content

Commit f86c1d6

Browse files
committed
Add constants and javadoc for supported syntax
Issue: #3717 Signed-off-by: yongjunhong <[email protected]>
1 parent eb1b5b3 commit f86c1d6

File tree

1 file changed

+70
-0
lines changed
  • junit-jupiter-engine/src/main/java/org/junit/jupiter/engine

1 file changed

+70
-0
lines changed

junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/Constants.java

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,76 @@
4949
@API(status = STABLE, since = "5.0")
5050
public final class Constants {
5151

52+
/**
53+
* Property name used to include patterns for auto-detecting extensions: {@value}
54+
*
55+
* <h4>Pattern Matching Syntax</h4>
56+
*
57+
* <p>If the property value consists solely of an asterisk ({@code *}), all
58+
* extensions will be included. Otherwise, the property value will be treated
59+
* as a comma-separated list of patterns where each individual pattern will be
60+
* matched against the fully qualified class name (<em>FQCN</em>) of each extension.
61+
* Any dot ({@code .}) in a pattern will match against a dot ({@code .})
62+
* or a dollar sign ({@code $}) in a FQCN. Any asterisk ({@code *}) will match
63+
* against one or more characters in a FQCN. All other characters in a pattern
64+
* will be matched one-to-one against a FQCN.
65+
*
66+
* <h4>Examples</h4>
67+
*
68+
* <ul>
69+
* <li>{@code *}: includes all extensions.
70+
* <li>{@code org.junit.*}: includes every extension under the {@code org.junit}
71+
* base package and any of its subpackages.
72+
* <li>{@code *.MyExtension}: includes every extension whose simple class name is
73+
* exactly {@code MyExtension}.
74+
* <li>{@code *System*}: includes every extension whose FQCN contains
75+
* {@code System}.
76+
* <li>{@code *System*, *Dev*}: includes every extension whose FQCN contains
77+
* {@code System} or {@code Dev}.
78+
* <li>{@code org.example.MyExtension, org.example.TheirExtension}: includes
79+
* extensions whose FQCN is exactly {@code org.example.MyExtension} or
80+
* {@code org.example.TheirExtension}.
81+
* </ul>
82+
*
83+
* @see JupiterConfiguration#EXTENSIONS_AUTODETECTION_INCLUDE_PROPERTY_NAME
84+
*/
85+
public static final String EXTENSIONS_AUTODETECTION_INCLUDE_PROPERTY_NAME = JupiterConfiguration.EXTENSIONS_AUTODETECTION_INCLUDE_PROPERTY_NAME;
86+
87+
/**
88+
* Property name used to exclude patterns for auto-detecting extensions: {@value}
89+
*
90+
* <h4>Pattern Matching Syntax</h4>
91+
*
92+
* <p>If the property value consists solely of an asterisk ({@code *}), all
93+
* extensions will be excluded. Otherwise, the property value will be treated
94+
* as a comma-separated list of patterns where each individual pattern will be
95+
* matched against the fully qualified class name (<em>FQCN</em>) of each extension.
96+
* Any dot ({@code .}) in a pattern will match against a dot ({@code .})
97+
* or a dollar sign ({@code $}) in a FQCN. Any asterisk ({@code *}) will match
98+
* against one or more characters in a FQCN. All other characters in a pattern
99+
* will be matched one-to-one against a FQCN.
100+
*
101+
* <h4>Examples</h4>
102+
*
103+
* <ul>
104+
* <li>{@code *}: excludes all extensions.
105+
* <li>{@code org.junit.*}: excludes every extension under the {@code org.junit}
106+
* base package and any of its subpackages.
107+
* <li>{@code *.MyExtension}: excludes every extension whose simple class name is
108+
* exactly {@code MyExtension}.
109+
* <li>{@code *System*}: excludes every extension whose FQCN contains
110+
* {@code System}.
111+
* <li>{@code *System*, *Dev*}: excludes every extension whose FQCN contains
112+
* {@code System} or {@code Dev}.
113+
* <li>{@code org.example.MyExtension, org.example.TheirExtension}: excludes
114+
* extensions whose FQCN is exactly {@code org.example.MyExtension} or
115+
* {@code org.example.TheirExtension}.
116+
* </ul>
117+
*
118+
* @see JupiterConfiguration#EXTENSIONS_AUTODETECTION_EXCLUDE_PROPERTY_NAME
119+
*/
120+
public static final String EXTENSIONS_AUTODETECTION_EXCLUDE_PROPERTY_NAME = JupiterConfiguration.EXTENSIONS_AUTODETECTION_EXCLUDE_PROPERTY_NAME;
121+
52122
/**
53123
* Property name used to provide patterns for deactivating conditions: {@value}
54124
*

0 commit comments

Comments
 (0)