Class SourceFileFactory

java.lang.Object
org.wurbelizer.wurbel.SourceFileFactory

public final class SourceFileFactory extends Object
A factory and cache for sourcefiles.
Author:
harald
  • Method Details

    • open

      public static SourceFile open(String filename) throws WurbelException
      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

      public static int flushAll() throws WurbelException
      Flushes all files and clears the vector.
      Returns:
      the number of updated files
      Throws:
      WurbelException - if closing a file failed