@gselzer Made some progress on the PR chain:
I also rebased a couple of old topic branches and pushed them to stale/
prefix to clarify that they are old and may be obsolete now. I didn't finish going through all topic branches on the incubator yet, but the plan is to do that.
Discoverer<?>
e.g. from the ServiceLoader
.
Discoverer
implementations much cleaner
To summarize, TherapiDiscoverer
is an abstract class, whose subclasses need to implement (among less important things):
protected abstract <U> U convert(Discovery<AnnotatedElement> e, Class<U> c);
This method is called by
@Override
public <U> List<U> discover(Class<U> c) {
if (!canDiscover(c))
return Collections.emptyList();
List<Discovery<AnnotatedElement>> elements = elementsTaggedWith(tagType());
return convertEach(elements, c);
}
Discovery
in this one instance, that class will probably be moved into SciJava Discovery Therapi
Op
s/OpCollection
s to the StaticDiscoverer
in tests
Discoverer
s are supposed to give a list of instances
NilConverter
NilConverter
Types
depends on org.scijava.util.MiscUtils.compare
, but I'm just going to figure out how to get the same functionality without that dependency)
Validated
, ValidityProblem
, and ValidityException
in the org.scijava.common3.validity
package
Priority
to that as well
POM
and Manifest
(and by extension Versioned
), which live in the package org.scijava.util
...
StringBuilder.append()
calls that included some String
variable. What might be better known is that String
concatenation with variables uses new StringBuilder().append(s1)...append(sN).toString()
uner the hood. What I learned was that chaining calls are heavily optimized over sequential calls.