+ public static BindingStructuralType recursiveFrom(final DataTreeCandidateNode node) {
+ final BindingStructuralType type = BindingStructuralType.from(node);
+ switch (type) {
+ case INVISIBLE_CONTAINER:
+ case INVISIBLE_LIST:
+ // This node is invisible, try to resolve using a child node
+ for (final DataTreeCandidateNode child : node.getChildNodes()) {
+ final BindingStructuralType childType = recursiveFrom(child);
+ switch (childType) {
+ case INVISIBLE_CONTAINER:
+ case INVISIBLE_LIST:
+ // Invisible nodes are not addressable
+ return BindingStructuralType.NOT_ADDRESSABLE;
+ case NOT_ADDRESSABLE:
+ case UNKNOWN:
+ case VISIBLE_CONTAINER:
+ return childType;
+ default:
+ throw new IllegalStateException("Unhandled child type " + childType + " for child "
+ + child);
+ }
+ }
+
+ return BindingStructuralType.NOT_ADDRESSABLE;
+ default:
+ return type;
+ }
+ }
+
+ private static boolean isVisibleContainer(final NormalizedNode data) {