formatting
[yosql.git] / yosql-codegen / src / main / java / wtf / metio / yosql / codegen / files / ParserPreconditions.java
blob04a0f1b448a13f536a6f9d7c11a127e5134942e9
1 /*
2 * This file is part of yosql. It is subject to the license terms in the LICENSE file found in the top-level
3 * directory of this distribution and at https://creativecommons.org/publicdomain/zero/1.0/. No part of yosql,
4 * including this file, may be copied, modified, propagated, or distributed except according to the terms contained
5 * in the LICENSE file.
6 */
8 package wtf.metio.yosql.codegen.files;
10 import java.nio.file.Path;
12 /**
13 * Preconditions that have to be matched for SQL parsing to work.
15 public interface ParserPreconditions { // TODO: rename to CodegenPreconditions b/c writing is for generators not parsers
17 /**
18 * Asserts that a single directory is writable. In order to be writable, the directory has to:
19 * <ul>
20 * <li>exist</li>
21 * <li>be a directory (not a file)</li>
22 * <li>be writable by the current process</li>
23 * </ul>
25 * @param directory The directory to check
27 void assertDirectoryIsWriteable(Path directory);
29 /**
30 * Asserts that a single directory is readable. In order to be readable, the directory has to:
31 * <ul>
32 * <li>exist</li>
33 * <li>be a directory (not a file)</li>
34 * <li>be readable by the current process</li>
35 * </ul>
37 * @param directory The directory to check
39 void directoryIsReadable(Path directory);