Skip to content

Commit b18849d

Browse files
ctruedenclaude
andcommitted
Deprecate classes superseded by SciJava3
Marks the 35 classes whose functionality now lives in the scijava/scijava repository: the primitive arrays (scijava-collections), the general utilities (scijava-common3), the metadata readers (scijava-meta), Priority and Prioritized (scijava-priority), the small root interfaces (scijava-spi), and ItemIO (scijava-struct). The pointers use {@code}, not {@link}. The replacements cannot be on this project's classpath: they target Java 11 while this project targets Java 8, so javadoc would fail reading their class files. A {@link} to an absent class is a doclint reference error, and doclint is only disabled under the build-javadoc profile, which is not active for releases. Verified: javadoc with -Ddoclint=all,-missing reports exactly the same 8 pre-existing messages before and after this change. Where a replacement differs subtly -- renamed methods, dropped methods, or changed behavior -- the tag says so and links to the migration table at https://github.com/scijava/scijava/blob/main/docs/migration.md rather than reproducing it here. No functional change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013gJpzGd3ksbME4CN6Tu2ni
1 parent 551f62a commit b18849d

35 files changed

Lines changed: 149 additions & 0 deletions

‎src/main/java/org/scijava/Disposable.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@
3333
* An object that knows how to clean up after itself.
3434
*
3535
* @author Curtis Rueden
36+
*
37+
* @deprecated Use {@code org.scijava.spi.Disposable} (scijava-spi) instead,
38+
* whose {@code dispose()} is abstract rather than a no-op default.
3639
*/
40+
@Deprecated
3741
public interface Disposable {
3842

3943
/**

‎src/main/java/org/scijava/Identifiable.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@
5151
* </p>
5252
*
5353
* @author Curtis Rueden
54+
*
55+
* @deprecated Use {@code org.scijava.spi.Identifiable} (scijava-spi) instead,
56+
* whose {@code getIdentifier} is named {@code id()}.
5457
*/
58+
@Deprecated
5559
public interface Identifiable {
5660

5761
/** Gets a string intended to function as an identifier for the object. */

‎src/main/java/org/scijava/ItemIO.java‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@
4242
* </ul>
4343
*
4444
* @author Curtis Rueden
45+
*
46+
* @deprecated Use {@code org.scijava.struct.ItemIO} (scijava-struct) instead.
4547
*/
48+
@Deprecated
4649
public enum ItemIO {
4750
INPUT, OUTPUT, BOTH
4851
}

‎src/main/java/org/scijava/Named.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@
3333
* Interface for things that have names.
3434
*
3535
* @author Lee Kamentsky
36+
*
37+
* @deprecated Use {@code org.scijava.spi.Named} (scijava-spi) instead, whose
38+
* method is {@code name()}. It has no setter: naming an object is
39+
* a separate contract from knowing its name.
3640
*/
41+
@Deprecated
3742
public interface Named {
3843

3944
/** Gets the name of the object. */

‎src/main/java/org/scijava/Prioritized.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@
3535
* An object that can be sorted according to priority.
3636
*
3737
* @author Curtis Rueden
38+
*
39+
* @deprecated Use {@code org.scijava.priority.Prioritized} (scijava-priority)
40+
* instead.
3841
*/
42+
@Deprecated
3943
public interface Prioritized extends Comparable<Prioritized> {
4044

4145
/**

‎src/main/java/org/scijava/Priority.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@
3636
* @author Curtis Rueden
3737
* @see org.scijava.Prioritized#getPriority()
3838
* @see org.scijava.plugin.Plugin#priority()
39+
*
40+
* @deprecated Use {@code org.scijava.priority.Priority} (scijava-priority)
41+
* instead.
3942
*/
43+
@Deprecated
4044
public final class Priority {
4145

4246
private Priority() {

‎src/main/java/org/scijava/Versioned.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@
3535
* An object that knows its version.
3636
*
3737
* @author Curtis Rueden
38+
*
39+
* @deprecated Use {@code org.scijava.spi.Versioned} (scijava-spi) instead,
40+
* whose method is {@code version()}.
3841
*/
42+
@Deprecated
3943
public interface Versioned {
4044

4145
/** Gets the version of the object. */

‎src/main/java/org/scijava/util/AbstractPrimitiveArray.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@
4545
* @author Curtis Rueden
4646
* @param <ArrayType> Type of the primitive array; e.g., {@code double[]}.
4747
* @param <BaseType> Boxed type of the array element; e.g., {@code Double}.
48+
*
49+
* @deprecated Use {@code org.scijava.collections.AbstractPrimitiveArray}
50+
* (scijava-collections) instead.
4851
*/
52+
@Deprecated
4953
public abstract class AbstractPrimitiveArray<ArrayType, BaseType> extends
5054
AbstractList<BaseType> implements PrimitiveArray<ArrayType, BaseType>
5155
{

‎src/main/java/org/scijava/util/AppUtils.java‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@
4141
*
4242
* @author Johannes Schindelin
4343
* @author Curtis Rueden
44+
*
45+
* @deprecated Use {@code org.scijava.common3.Apps} (scijava-common3) instead.
4446
*/
47+
@Deprecated
4548
public final class AppUtils {
4649

4750
private static final Class<?> mainClass;

‎src/main/java/org/scijava/util/ArrayUtils.java‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,14 @@
6868
* @author Curtis Rueden
6969
* @author Melissa Linkert
7070
* @author Chris Allan
71+
*
72+
* @deprecated Only the {@code safeMultiply} methods have a replacement, in
73+
* {@code org.scijava.common3.Numbers} (scijava-common3). For
74+
* {@code contains} and {@code indexOf}, use
75+
* {@link java.util.Arrays#asList} on object arrays, or a loop or
76+
* stream on primitive arrays.
7177
*/
78+
@Deprecated
7279
public final class ArrayUtils {
7380

7481
private ArrayUtils() {

0 commit comments

Comments
 (0)