Skip to content

Commit 1e44cf2

Browse files
committed
Notes for later
1 parent b7d1918 commit 1e44cf2

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@
102102

103103
<!-- NB: Deploy releases to the SciJava Maven repository. -->
104104
<releaseProfiles>deploy-to-scijava</releaseProfiles>
105+
106+
<!-- NB: Store method parameter names into the bytecode. -->
107+
<!-- Overkill, but lets us look up parameter names at runtime. -->
108+
<!-- https://www.beyondjava.net/reading-java-8-method-parameter-named-reflection -->
109+
<maven.compiler.parameters>true</maven.compiler.parameters>
105110
</properties>
106111

107112
<repositories>

src/main/java/org/scijava/ops/util/Adapt.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ public static class Functions {
3939
private Functions() {
4040
}
4141

42+
// TODO: when converting, add to a type map, so this computer can have its generic type discerned at will.
43+
// The type map also needs to be populated by OpField and OpMethod generic types when they are discovered.
44+
// The goal of the type map is to store, for each lambda op instance, what its generic type is.
45+
// We know what the generic type is during op discovery, because it's the
46+
// generic type of the field (in the case of OpField), or the generic type
47+
// parameters of the method (in the case of OpMethod).
4248
public static <I, O> Computer<I, O> asComputer(final Function<I, O> function, final Computer<O, O> copy) {
4349
return (in, out) -> {
4450
final O tmp = function.apply(in);

0 commit comments

Comments
 (0)