Class SourceFileFactory
java.lang.Object
org.wurbelizer.wurbel.SourceFileFactory
A factory and cache for sourcefiles.
- Author:
- harald
-
Method Summary
Modifier and TypeMethodDescriptionstatic intflushAll()Flushes all files and clears the vector.static voidDiscard all files in list, if any.static SourceFileOpens the file and load into memory.
If the file already has been loaded, it will be reused.static voidresetAll()Rewinds all output streams (makes them empty again).
-
Method Details
-
open
Opens the file and load into memory.
If the file already has been loaded, it will be reused.- Parameters:
filename- the filename- Returns:
- the open file
- Throws:
WurbelException- if reading the file did fail
-
initialize
public static void initialize()Discard all files in list, if any. -
resetAll
public static void resetAll()Rewinds all output streams (makes them empty again). -
flushAll
Flushes all files and clears the vector.- Returns:
- the number of updated files
- Throws:
WurbelException- if closing a file failed
-