public void notifyPath()

in schema-induction/src/main/java/aws/json/schema/induction/JsonStructureBuilder.java [29:46]


    public void notifyPath(String path, JsonToken type, int len) {
        String genericPath = generalizePath(path);

        if (paths.containsKey(genericPath)) {
            SchemaNode current = paths.get(genericPath);
            current.increaseOccurrences();
            if (current.getType() != type) {
                current.generalizeTypes(current.getType(), type);
            }
            if (len != -1 && current.getStringLength() < len)
                current.setStringLength(len);
        } else {
            SchemaNode current = new SchemaNode(genericPath,type);
            addNodeToPaths(current);
            addParentsIfNotExists(current);
            current.setStringLength(len);
        }
    }