public final class SymbolIo
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.io.File |
exportToJava(SymbolTable table,
java.io.File directory,
boolean finalIds)
Exports a symbol table to a java
R class source. |
static SymbolTable |
read(java.io.File file)
Loads a symbol table from a symbol file.
|
static void |
write(SymbolTable table,
java.io.File file)
Writes a symbol table to a symbol file.
|
@NonNull public static SymbolTable read(@NonNull java.io.File file) throws java.io.IOException
file - the symbol filejava.io.IOException - failed to read the tablepublic static void write(@NonNull
SymbolTable table,
@NonNull
java.io.File file)
table - the tablefile - the file where the table should be writtenjava.io.UncheckedIOException - I/O error@NonNull
public static java.io.File exportToJava(@NonNull
SymbolTable table,
@NonNull
java.io.File directory,
boolean finalIds)
R class source. This method will create the source
file and any necessary directories. For example, if the package is a.b and the
class name is RR, this method will generate a file called RR.java in
directory directory/a/b creating directories a and b if necessary.table - the table to exportdirectory - the directory where the R source should be generatedfinalIds - should the generated IDs be final?java.io.UncheckedIOException - failed to generate the source