-
- All Superinterfaces:
Comparable<InfoTreeGenerator>,Prioritized<InfoTreeGenerator>
- All Known Implementing Classes:
AdaptationInfoTreeGenerator,ConvertedInfoTreeGenerator,DefaultInfoTreeGenerator
public interface InfoTreeGenerator extends Prioritized<InfoTreeGenerator>
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleancanGenerate(String signature)Describes whether thisInfoTreeGeneratoris designed to generate the outer layer of theInfoTreestatic InfoTreeGeneratorfindSuitableGenerator(String signature, Collection<InfoTreeGenerator> generators)Filters through a list ofInfoTreeGenerators to find the generator best suited towards generatingsignatureInfoTreegenerate(OpEnvironment env, String signature, Map<String,OpInfo> idMap, Collection<InfoTreeGenerator> generators)Generates anInfoTree.static InfoTreegenerateDependencyTree(OpEnvironment env, String subsignature, Map<String,OpInfo> idMap, Collection<InfoTreeGenerator> generators)default doublepriority()static StringsubSignatureFrom(String signature, int start)Finds the subsignature inStringsignature.-
Methods inherited from interface org.scijava.priority.Prioritized
compareTo
-
-
-
-
Method Detail
-
generate
InfoTree generate(OpEnvironment env, String signature, Map<String,OpInfo> idMap, Collection<InfoTreeGenerator> generators)
Generates anInfoTree. ThisInfoTreeGeneratoris only responsible for generating the outer layer of theInfoTree, and delegates togeneratorsto generate other needed components, such as dependencies.- Parameters:
env- theOpEnvironmentsignature- the signature for which anInfoTreeGeneratormust be generatedidMap- the availableOpInfos, keyed by their idgenerators- the availableInfoTreeGenerators- Returns:
- an
InfoTreematching the specifications ofsignature
-
findSuitableGenerator
static InfoTreeGenerator findSuitableGenerator(String signature, Collection<InfoTreeGenerator> generators)
Filters through a list ofInfoTreeGenerators to find the generator best suited towards generatingsignature- Parameters:
signature- the signature that must be generatedgenerators- the list ofInfoTreeGenerators- Returns:
- the
InfoTreeGeneratorbest suited to the task
-
generateDependencyTree
static InfoTree generateDependencyTree(OpEnvironment env, String subsignature, Map<String,OpInfo> idMap, Collection<InfoTreeGenerator> generators)
-
subSignatureFrom
static String subSignatureFrom(String signature, int start)
Finds the subsignature inStringsignature. The subsignature is assumed to start at indexstart. Note that we cannot simply useString.substring(int)because the subsignature may have dependencies, which are not easily parsed.- Parameters:
signature- the signature of some Opstart- the index where the subsignature starts- Returns:
- a signature contained withing
signature
-
canGenerate
boolean canGenerate(String signature)
Describes whether thisInfoTreeGeneratoris designed to generate the outer layer of theInfoTree- Parameters:
signature- the signature to use as the template for theInfoTree- Returns:
- true iff this
InfoTreeGeneratorcan generate the outer layer of theInfoTree
-
priority
default double priority()
- Specified by:
priorityin interfacePrioritized<InfoTreeGenerator>
-
-