private CNode createOrGetChild(DefLine.Type type, String name) throws IllegalArgumentException {
        String key = name;
        int split = name.indexOf('.');
        CNode newChild;
        if (split != -1) {
            key = name.substring(0, split).trim();
            newChild = new InnerCNode(this, key);
        } else {
            newChild = LeafCNode.newInstance(type, this, key);
            if (newChild == null)
                throw new IllegalArgumentException("Could not create " + type.name + " " + name);
        }
        return children.getOrDefault(newChild.getName(), newChild);
    }
Returns and eventually creates the given subnode.
configgen/src/main/java/com/yahoo/config/codegen/InnerCNode.java