Skip to content

Commit 6022c55

Browse files
committed
Fix OpBuilder.vm and re-generate
1 parent ec030ac commit 6022c55

2 files changed

Lines changed: 3 additions & 35 deletions

File tree

scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpBuilder.java

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -47,48 +47,16 @@
4747

4848
/**
4949
* Convenience class for looking up and/or executing ops using a builder
50-
* pattern. The general order of specification:
51-
* <ol>
52-
* <li>The op name</li>
53-
* <li>The number of input(s)</li>
54-
* <li>The type or value(s) of input(s)</li>
55-
* <li>One of:
56-
* <ul>
57-
* <li>The type or value of the output</li>
58-
* <li>Which input should be modified in-place</li>
59-
* </ul>
60-
* </li>
61-
* </ol>
62-
* The first two steps are required, at a minimum. The choices you make will
63-
* determine the <i>type</i> of Op that is matched:
64-
* <ul>
65-
* <li>No inputs &rarr; <code>Producer</code> or <code>Computer</code></li>
66-
* <li>Inputs with an output <i>value</i> &rarr; <code>Computer</code></li>
67-
* <li>Inputs with an output <i>type</i> &rarr; <code>Computer</code> or <code>Function</code></li>
68-
* <li>Inputs with no output &rarr; <code>Inplace</code> or <code>Function</code> with unknown (<code>Object</code>) return</li>
69-
* </ul>
50+
* pattern. Typical entry point is through {@code OpEnvironment.op(String)}
51+
* - which contains full usage information.
7052
* <br/>
71-
* <p>
7253
* Note that the intermediate builder steps use the following acronyms:
7354
* <ul>
7455
* <li><b>IV/OV:</b> Input/Output Value. Indicates instances will be used for matching; ideal if you want to directly run the matched Op, e.g. via <code>apply</code>, <code>compute</code>, <code>mutate</code> or <code>create</code> methods.</li>
7556
* <li><b>IT/OT:</b> Input/Output Types. Indicates {@code Classes} will be used for matching; matching will produce an Op instance that can then be (re)used. There are two "Type" options: raw types or {@code Nil}s. If you are matching using a parameterized type use the {@code Nil} option to preserve the type parameter.</li>
7657
* <li><b>OU:</b> Output Unknown. Indicates an output type/value has not been specified to the builder yet. The output, if any, will simply be an {@code Object}</li>
7758
* </ul>
7859
* </p>
79-
* <p>
80-
* Examples:
81-
* {@code OpEnvironment env = new DefaultOpEnvironment();}
82-
* <ul>
83-
* <li>{@code env.op("create").arity0().outType(DoubleType.class).create();} &#8212; run an Op creating an instance of the ImgLib2 {@code DoubleType}</li>
84-
* <li>{@code env.op("create").arity0().outType(Img.class).create();} &#8212; run an Op creating a raw instance of an ImgLib2 {@code Img}.</li>
85-
* <li>{@code env.op("create").arity0().outType(new Nil<Img<DoubleType>>(){}).create();} &#8212; run an Op creating an instance of an ImgLib2 {@code Img<DoubleType>}.</li>
86-
* <li>{@code env.op("math.add").arity2().inType(Integer.class, Integer.class).function();} &#8212; get an instance of an Op to add two integers together. Return type will be {@code Object}.</li>
87-
* <li>{@code env.op("math.add").arity2().input(1, 1).outType(Double.class).apply();} &#8212; run an Op combining two integers. Return type will be {@code Double}.</li>
88-
* <li>{@code env.op("math.add").arity2().input(img1, img2).output(result).compute();} &#8212; run an Op combining two images and storing the result in a pre-allocated image.</li>
89-
* <li>{@code env.op("filter.addPoissonNoise").arity1().input(img1).mutate();} &#8212; run an Op adding poisson noise to an input image.</li>
90-
* </ul>
91-
* </p>
9260
*
9361
* @author Curtis Rueden
9462
* @author Gabriel Selzer

scijava/scijava-ops-api/templates/main/java/org/scijava/ops/api/OpBuilder.vm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import org.scijava.types.Types;
4747

4848
/**
4949
* Convenience class for looking up and/or executing ops using a builder
50-
* pattern. Typical entry point is through {@link OpEnvironment#op(String)}
50+
* pattern. Typical entry point is through {@code OpEnvironment.op(String)}
5151
* - which contains full usage information.
5252
* <br/>
5353
* Note that the intermediate builder steps use the following acronyms:

0 commit comments

Comments
 (0)