Skip to content

Commit 56264f8

Browse files
committed
Context: add @see links to the main constructor
That constructor contains the most complete javadoc, which we want to encourage people to read, even if they use a different convenience constructor. This is DRYer than replicating all the documentation for every single convenience constructor.
1 parent b39610e commit 56264f8

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/main/java/org/scijava/Context.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ public class Context implements Disposable {
7777
/** Master index of all plugins known to the application context. */
7878
private final PluginIndex pluginIndex;
7979

80-
/** Creates a new SciJava application context with all available services. */
80+
/**
81+
* Creates a new SciJava application context with all available services.
82+
*
83+
* @see #Context(Collection, PluginIndex, boolean)
84+
*/
8185
public Context() {
8286
this(false);
8387
}
@@ -87,6 +91,7 @@ public Context() {
8791
*
8892
* @param empty If true, the context will be empty; otherwise, it will be
8993
* initialized with all available services.
94+
* @see #Context(Collection, PluginIndex, boolean)
9095
*/
9196
@SuppressWarnings("unchecked")
9297
public Context(final boolean empty) {
@@ -113,6 +118,7 @@ public Context(final boolean empty) {
113118
*
114119
* @param serviceClasses A list of types that implement the {@link Service}
115120
* interface (e.g., {@code DisplayService.class}).
121+
* @see #Context(Collection, PluginIndex, boolean)
116122
* @throws ClassCastException If any of the given arguments do not implement
117123
* the {@link Service} interface.
118124
*/
@@ -128,6 +134,7 @@ public Context(final Class... serviceClasses) {
128134
*
129135
* @param serviceClasses A collection of types that implement the
130136
* {@link Service} interface (e.g., {@code DisplayService.class}).
137+
* @see #Context(Collection, PluginIndex, boolean)
131138
*/
132139
public Context(final Collection<Class<? extends Service>> serviceClasses) {
133140
this(serviceClasses, null);
@@ -141,6 +148,7 @@ public Context(final Collection<Class<? extends Service>> serviceClasses) {
141148
* {@link Service} interface (e.g., {@code DisplayService.class}).
142149
* @param strict Whether context creation will fail fast when there is
143150
* is an error instantiating a required service.
151+
* @see #Context(Collection, PluginIndex, boolean)
144152
*/
145153
public Context(final Collection<Class<? extends Service>> serviceClasses,
146154
final boolean strict)
@@ -160,6 +168,7 @@ public Context(final Collection<Class<? extends Service>> serviceClasses,
160168
* {@link org.scijava.plugin.PluginFinder} implementation), then you
161169
* can pass a custom {@link PluginIndex} here. Passing null will
162170
* result in a default plugin index being constructed and used.
171+
* @see #Context(Collection, PluginIndex, boolean)
163172
*/
164173
@SuppressWarnings("unchecked")
165174
public Context(final PluginIndex pluginIndex) {
@@ -180,6 +189,7 @@ public Context(final PluginIndex pluginIndex) {
180189
* {@link org.scijava.plugin.PluginFinder} implementation), then you
181190
* can pass a custom {@link PluginIndex} here. Passing null will
182191
* result in a default plugin index being constructed and used.
192+
* @see #Context(Collection, PluginIndex, boolean)
183193
*/
184194
public Context(final Collection<Class<? extends Service>> serviceClasses,
185195
final PluginIndex pluginIndex)

0 commit comments

Comments
 (0)