public class SectParentResolver extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SectParentResolver.CyclicSectionsException
Exception to signal that cyclic parent sections have been found.
|
static interface |
SectParentResolver.ParentCollector |
| Constructor and Description |
|---|
SectParentResolver() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkCyclicParents(String sectName,
SectionInfo manager)
Checks for cyclic parents of the given section, and throws an exception if a cyclic
relationship is found.
|
static void |
collectParents(String sectName,
SectionInfo manager,
SectParentResolver.ParentCollector collector)
Collects the parent section names of the given sectName.
|
static void |
collectParentsUnchecked(String sectName,
SectionInfo manager,
SectParentResolver.ParentCollector collector)
The same as
collectParents(String, SectionInfo, ParentCollector), but does not throw
exception if cycles found. |
static Map<String,Set<String>> |
getParentDependencies(String sectName,
SectionInfo manager)
Calculates a parent dependency map.
|
static Set<String> |
getParents(String sectName,
SectionInfo manager)
Collects all parents for the given section.
|
public static void checkCyclicParents(String sectName, SectionInfo manager) throws CommandException, SectParentResolver.CyclicSectionsException
sectName - manager - CommandExceptionSectParentResolver.CyclicSectionsExceptionpublic static Map<String,Set<String>> getParentDependencies(String sectName, SectionInfo manager) throws CommandException, SectParentResolver.CyclicSectionsException
sectName - manager - CommandExceptionSectParentResolver.CyclicSectionsExceptionpublic static Set<String> getParents(String sectName, SectionInfo manager) throws CommandException
sectName - manager - CommandExceptionpublic static void collectParents(String sectName, SectionInfo manager, SectParentResolver.ParentCollector collector) throws CommandException, SectParentResolver.CyclicSectionsException
sectName - manager - collector - CommandExceptionSectParentResolver.CyclicSectionsException - if a cyclic parent relationships are foundpublic static void collectParentsUnchecked(String sectName, SectionInfo manager, SectParentResolver.ParentCollector collector) throws CommandException
collectParents(String, SectionInfo, ParentCollector), but does not throw
exception if cycles found. If a cycle is visited, the repeated section is ignored.sectName - manager - collector - CommandExceptionCopyright © 2003–2016 Community Z Tools Project. All rights reserved.