- java.lang.Object
-
- org.scijava.ops.engine.impl.DefaultOpEnvironment
-
- All Implemented Interfaces:
Comparable<OpEnvironment>,OpEnvironment,Prioritized<OpEnvironment>
public class DefaultOpEnvironment extends Object implements OpEnvironment
Default implementation ofOpEnvironment, whose ops and related state are discovered from a SciJava application context.- Author:
- Curtis Rueden, Gabriel Selzer
-
-
Constructor Summary
Constructors Constructor Description DefaultOpEnvironment()DefaultOpEnvironment(Discoverer... discoverers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddiscoverEverything()voiddiscoverUsing(Discoverer... arr)TypegenericType(Object obj)HintsgetDefaultHints()Stringhelp(OpRequest request)StringhelpVerbose(OpRequest request)OpHistoryhistory()SortedSet<OpInfo>infos()SortedSet<OpInfo>infos(String name)SortedSet<OpInfo>infos(String name, Hints hints)SortedSet<OpInfo>infos(Hints hints)<T> Top(String opName, Nil<T> specialType, Nil<?>[] inTypes, Nil<?> outType, Hints hints)<T> TopFromInfoTree(InfoTree tree, Nil<T> specialType, Hints hints)OpInfoopify(Class<?> opClass, double priority, String... names)doublepriority()voidregister(Object... objects)voidsetDefaultHints(Hints hints)Sets the defaultHintsused for finding Ops.InfoTreetreeFromSignature(String signature)<T> TtypeLambda(Nil<T> opType, T lambda)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.scijava.ops.api.OpEnvironment
help, help, helpVerbose, helpVerbose, op, op, op, opFromInfoTree, opFromSignature, opify
-
Methods inherited from interface org.scijava.priority.Prioritized
compareTo
-
-
-
-
Constructor Detail
-
DefaultOpEnvironment
public DefaultOpEnvironment()
-
DefaultOpEnvironment
public DefaultOpEnvironment(Discoverer... discoverers)
-
-
Method Detail
-
history
public OpHistory history()
- Specified by:
historyin interfaceOpEnvironment
-
infos
public SortedSet<OpInfo> infos()
- Specified by:
infosin interfaceOpEnvironment
-
infos
public SortedSet<OpInfo> infos(String name)
- Specified by:
infosin interfaceOpEnvironment
-
infos
public SortedSet<OpInfo> infos(Hints hints)
- Specified by:
infosin interfaceOpEnvironment
-
infos
public SortedSet<OpInfo> infos(String name, Hints hints)
- Specified by:
infosin interfaceOpEnvironment
-
discoverUsing
public void discoverUsing(Discoverer... arr)
- Specified by:
discoverUsingin interfaceOpEnvironment
-
discoverEverything
public void discoverEverything()
- Specified by:
discoverEverythingin interfaceOpEnvironment
-
op
public <T> T op(String opName, Nil<T> specialType, Nil<?>[] inTypes, Nil<?> outType, Hints hints)
- Specified by:
opin interfaceOpEnvironment
-
opFromInfoTree
public <T> T opFromInfoTree(InfoTree tree, Nil<T> specialType, Hints hints)
- Specified by:
opFromInfoTreein interfaceOpEnvironment
-
treeFromSignature
public InfoTree treeFromSignature(String signature)
- Specified by:
treeFromSignaturein interfaceOpEnvironment
-
genericType
public Type genericType(Object obj)
- Specified by:
genericTypein interfaceOpEnvironment
-
opify
public OpInfo opify(Class<?> opClass, double priority, String... names)
- Specified by:
opifyin interfaceOpEnvironment
-
typeLambda
public <T> T typeLambda(Nil<T> opType, T lambda)
- Specified by:
typeLambdain interfaceOpEnvironment
-
register
public void register(Object... objects)
- Specified by:
registerin interfaceOpEnvironment
-
help
public String help(OpRequest request)
- Specified by:
helpin interfaceOpEnvironment
-
helpVerbose
public String helpVerbose(OpRequest request)
- Specified by:
helpVerbosein interfaceOpEnvironment
-
setDefaultHints
public void setDefaultHints(Hints hints)
Sets the defaultHintsused for finding Ops.Note that this method is not thread safe and is provided for convenience. If the user wishes to use
Hintsin a thread-safe manner, they should useop(String, Nil, Nil[], Nil, Hints)if using differentHintsfor different calls. Alternatively, this method can be called before all Ops called in parallel without issues.- Specified by:
setDefaultHintsin interfaceOpEnvironment
-
getDefaultHints
public Hints getDefaultHints()
- Specified by:
getDefaultHintsin interfaceOpEnvironment
-
priority
public double priority()
- Specified by:
priorityin interfacePrioritized<OpEnvironment>
-
-