| java.lang.Object fri.patterns.interpreter.parsergenerator.builder.SerializedObject
All known Subclasses: fri.patterns.interpreter.parsergenerator.builder.SerializedLexer, fri.patterns.interpreter.parsergenerator.builder.SerializedParser, fri.patterns.interpreter.parsergenerator.builder.SerializedTables,
SerializedObject | class SerializedObject (Code) | | Base class for serialization and deserialisation of Java-objects.
author: (c) 2000, Fritz Ritzberger |
Method Summary | |
public static String | baseNameFromSyntax(Object syntaxInput) When syntaxInput is a File, the name of the serialization file is created
from its basename (without any extension), else "Unknown" is assumed as basename. | protected String | ensureDirectory(String fileName) Creates the directory of passed filename if it does not exist. | protected String | makeFilePath(String fileName) Puts the file into ".friware/parsers" directory in "user.home". | protected Object | read(String fileName) Deserializes an object from filesystem. | public static Syntax | toSyntax(Object syntaxInput) Converts a File, InputStream, Reader, String, StringBuffer, List of Lists or String[][] to a Syntax. | protected boolean | write(String fileName, Object o) Serializes an object to filesystem. |
SerializedObject | public SerializedObject()(Code) | | Do-nothing constructor.
|
baseNameFromSyntax | public static String baseNameFromSyntax(Object syntaxInput)(Code) | | When syntaxInput is a File, the name of the serialization file is created
from its basename (without any extension), else "Unknown" is assumed as basename.
The returned name has no path.
|
ensureDirectory | protected String ensureDirectory(String fileName)(Code) | | Creates the directory of passed filename if it does not exist. @return the directory name.
|
makeFilePath | protected String makeFilePath(String fileName)(Code) | | Puts the file into ".friware/parsers" directory in "user.home".
|
read | protected Object read(String fileName)(Code) | | Deserializes an object from filesystem.
deserialized object. |
toSyntax | public static Syntax toSyntax(Object syntaxInput) throws Exception(Code) | | Converts a File, InputStream, Reader, String, StringBuffer, List of Lists or String[][] to a Syntax.
|
write | protected boolean write(String fileName, Object o)(Code) | | Serializes an object to filesystem.
true on success. |
|
|