You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9084574
Browse filesBrowse the repository at this point in the historyBrowse files
scijava-spi: add a module of framework-free interfaces
A new dependency-free module for interfaces that any object can
implement without knowing about a SciJava framework, so that code
wanting only these contracts takes on the smallest possible dependency.
Contains Versioned and GenericTyped, moved out of scijava-common3, plus
Named, Identifiable and Disposable ported from SciJava Common. No
deprecated aliases are left in scijava-common3, which the repository's
current adoption level permits.
Method names are modernized rather than preserved: getIdentifier() is
now id(), and Disposable.dispose() is abstract rather than a no-op
default, since a default that does nothing means implementing the
interface proves nothing to callers. Named exposes name() only --
mutability is a separate contract, rather than a setter that throws
UnsupportedOperationException and forces every caller to feature-detect.
Deliberately omitted for now, pending a consumer:
- Locatable, whose only real content was a default implementation
requiring common3.Classes.location, which this module cannot depend on.
- Typed, which has no consumer until the plugin layer exists, and whose
Class<T> type() would silently satisfy GenericTyped.type() as well,
since Class implements Type.
Both are cheap to add on demand and expensive to remove once published.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013gJpzGd3ksbME4CN6Tu2ni
|`Versioned`|`org.scijava.spi.Versioned` (Phase 1; currently `common3`) | planned |
75
-
|`Named`, `Identifiable`, `Locatable`, `Typed`, `Disposable`|`org.scijava.spi.*` (Phase 1). `Named` becomes read-only — `String name()` — with mutability a separate contract | planned |
74
+
|`Versioned`|`org.scijava.spi.Versioned` (moved out of `common3`) | ported |
75
+
|`Named`|`org.scijava.spi.Named` — read-only `String name()`; mutability is a separate contract | ported |
76
+
|`Identifiable`|`org.scijava.spi.Identifiable` — `getIdentifier()` is now `id()`| ported |
77
+
|`Disposable`|`org.scijava.spi.Disposable` — `dispose()` is abstract, not a no-op default | ported |
78
+
|`Locatable`| deferred — its only content was a default implementation needing `common3.Classes.location`, which `scijava-spi` cannot depend on | open |
79
+
|`Typed`| deferred to the plugin layer — no consumer yet, and `Class<T> type()` collides with `GenericTyped.type()`| open |
76
80
|`Initializable`|`scijava-context` (Phase 2) — a lifecycle hook, not an SPI contract | planned |
0 commit comments