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
Copy file name to clipboardExpand all lines: docs/ops/doc/WritingYourOwnOpPackage.md
+7-15Lines changed: 7 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -284,12 +284,10 @@ At compile time, the SciJava Ops Indexer will convert each `@implNote` annotatio
284
284
285
285
#### Adding the SciJava Ops Indexer to your POM
286
286
287
-
Ops written through Javadoc are discovered by the SciJava Ops Indexer, which creates a file `ops.yaml` containing all of the data needed to import each Op you declare.
287
+
Ops written through Javadoc are discovered by the SciJava Ops Indexer, which creates an `ops.yaml` file containing all of the data needed to import each Op you declare.
288
288
289
289
Until the SciJava Ops annotation processor is integrated into [pom-scijava](https://github.com/scijava/pom-scijava), developers must add the following block of code to the `build` section of their project POM:
290
290
291
-
TODO: Replace with the pom-scijava version needed to grab this annotation processor.
292
-
TODO: Replace the SciJava Ops Indexer version with the correct initial version
293
291
```xml
294
292
<build>
295
293
<plugins>
@@ -314,6 +312,7 @@ TODO: Replace the SciJava Ops Indexer version with the correct initial version
314
312
</plugins>
315
313
</build>
316
314
```
315
+
**Note:** Replace the `<version>` property with the [latest release](https://maven.scijava.org/#nexus-search;quick~scijava-ops-indexer), or omit if using a [parent pom](https://github.com/scijava/pom-scijava) managing the indexer.
317
316
318
317
#### Declaring Ops with the `@implNote` syntax
319
318
@@ -369,7 +368,7 @@ public class MyClassOp
369
368
* @param arg1 the first argument to the Op
370
369
* @param arg2 the first argument to the Op
371
370
* @return the result of the Op
372
-
*/
371
+
*/
373
372
@Override
374
373
publicDoubleapply(Doublearg1, Doublearg2) {
375
374
returnnull;
@@ -384,9 +383,11 @@ Note that the only supported functional interfaces that can be used without addi
384
383
<dependency>
385
384
<groupId>org.scijava</groupId>
386
385
<artifactId>scijava-function</artifactId>
386
+
<version>1.0.0</version>
387
387
</dependency>
388
388
</dependencies>
389
389
```
390
+
**Note:**Replace the `<version>` property with the [latest release](https://maven.scijava.org/#nexus-search;quick~scijava-function), or omit if using a [parent pom](https://github.com/scijava/pom-scijava) managing SciJava Function.
@@ -413,16 +414,7 @@ To describe each Op parameter, add the following tags to its javadoc:
413
414
*To describe a conatiner (for a computer Op), add the Javadoc tag `@container<parameter_name><description>`
414
415
*To describe a mutable input (for an inplace Op), add the Javadoc tag `@mutable<parameter_name><description>`
415
416
416
-
Note again that the only supported functional interfaces that can be used without additional dependencies are `java.util.function.Function` and `java.util.function.BiFunction` -if you'd like to write an Op requiring more than two inputs, or to write an Op that takes a pre-allocated output buffer, you'll need to depend on the SciJavaFunction library:
417
-
418
-
```xml
419
-
<dependencies>
420
-
<dependency>
421
-
<groupId>org.scijava</groupId>
422
-
<artifactId>scijava-function</artifactId>
423
-
</dependency>
424
-
</dependencies>
425
-
```
417
+
Note again that the only supported functional interfaces that can be used without additional dependencies are `java.util.function.Function` and `java.util.function.BiFunction` -if you'd like to write an Op requiring more than two inputs, or to write an Op that takes a pre-allocated output buffer, you'll need to depend on the SciJavaFunction library, as mentioned above.
0 commit comments