GP-2555: Refactor StackProvider for object-mode trace.

This commit is contained in:
Dan 2022-11-02 10:31:19 -04:00
parent 284fd2dc03
commit 0d7cb0dd50
22 changed files with 1911 additions and 882 deletions

View file

@ -696,6 +696,13 @@ public interface TargetObjectSchema {
return null;
}
/**
* Search for a suitable object with this schema at the given path
*
* @param type the type of object sought
* @param path the path of a seed object
* @return the expected path of the suitable object, or null
*/
default List<String> searchForSuitable(Class<? extends TargetObject> type, List<String> path) {
for (; path != null; path = PathUtils.parent(path)) {
TargetObjectSchema schema = getSuccessorSchema(path);