public BaseType withNewArgs(List<Object> args) {
        Class<?>[] argTypes = new Class<?>[args.size()];
        int i = 0;
        for (; i < argTypes.length; i++) {
            argTypes[i] = args.get(i).getClass();
        }
        Object[] argList = args.toArray();
        try {
            return (BaseType) Reflection.getConstructor(this.getClass(), argList).newInstance(argList);
            //return (BaseType) this.getClass().getConstructor(argTypes).newInstance(args.toArray());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
The implementation should return a new instance other than `this`.
indexr-query-opt/src/main/java/io/indexr/query/TreeNode.java