Skip to content

Commit 58c83fe

Browse files
committed
Clean up BaseOpHints
1 parent 906bb6b commit 58c83fe

1 file changed

Lines changed: 29 additions & 9 deletions

File tree

‎scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/BaseOpHints.java‎

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
* POSSIBILITY OF SUCH DAMAGE.
2727
* #L%
2828
*/
29-
package org.scijava.ops.engine;
3029

31-
import java.lang.annotation.Annotation;
30+
package org.scijava.ops.engine;
3231

3332
/**
34-
* A set of common hints. Ideally these would be {@link Enum}s, but
35-
* unfortunately {@link Annotation}s cannot handle arrays of Enums :(
33+
* A set of common hints useful for manipulating SciJava Ops Engine internals.
34+
* Their usage is not recommended unless necessary to e.g. prevent some Op from
35+
* matching.
3636
*
3737
* @author Gabriel Selzer
3838
*/
@@ -42,28 +42,48 @@ private BaseOpHints() {
4242
// Prevent instantiation of static utility class
4343
}
4444

45-
public static class Reduction {
45+
public static final class Reduction {
46+
47+
private Reduction() {
48+
// Prevent instantiation of static utility class
49+
}
50+
4651
public static final String PREFIX = "reduction";
4752
public static final String FORBIDDEN = PREFIX + ".FORBIDDEN";
4853
}
4954

50-
public static class Simplification {
55+
public static final class Simplification {
56+
57+
private Simplification() {
58+
// Prevent instantiation of static utility class
59+
}
60+
5161
public static final String PREFIX = "simplification";
5262
public static final String FORBIDDEN = PREFIX + ".FORBIDDEN";
5363
public static final String IN_PROGRESS = PREFIX + ".IN_PROGRESS";
5464
}
5565

56-
public static class Adaptation {
66+
public static final class Adaptation {
67+
68+
private Adaptation() {
69+
// Prevent instantiation of static utility class
70+
}
71+
5772
public static final String PREFIX = "adaptation";
5873
public static final String FORBIDDEN = PREFIX + ".FORBIDDEN";
5974
public static final String IN_PROGRESS = PREFIX + ".IN_PROGRESS";
6075
}
6176

6277
// TODO: better naming
63-
public static class DependencyMatching {
78+
public static final class DependencyMatching {
79+
80+
private DependencyMatching() {
81+
// Prevent instantiation of static utility class
82+
}
83+
6484
public static final String PREFIX = "dependencyMatching";
6585
public static final String IN_PROGRESS = PREFIX + ".IN_PROGRESS";
66-
86+
6787
}
6888

6989
}

0 commit comments

Comments
 (0)