org.apache.maven.jxr.pacman
Class FileManager

java.lang.Object
  extended by org.apache.maven.jxr.pacman.FileManager

public class FileManager
extends java.lang.Object

Singleton that handles holding references to JavaFiles. This allows Alexandria to lookup and see if a file has already been parsed out and then it can load the information from memory instead of reparsing the file.

Note. This assumes that the file will not be modified on disk while Alexandria is running.


Constructor Summary
FileManager()
           
 
Method Summary
 void addFile(JavaFile file)
          Add a file to this filemanager.
 java.lang.String getEncoding()
          see setEncoding(String)
 JavaFile getFile(java.lang.String name)
          Get a file from it's name.
static FileManager getInstance()
          Get an instance of the FileManager
 void setEncoding(java.lang.String encoding)
          Encoding is the encoding of source files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileManager

public FileManager()
Method Detail

getInstance

public static FileManager getInstance()
Get an instance of the FileManager


getFile

public JavaFile getFile(java.lang.String name)
                 throws java.io.IOException
Get a file from it's name. If the file does not exist within the FileManager, create a new one and return it.

Throws:
java.io.IOException

addFile

public void addFile(JavaFile file)
Add a file to this filemanager.


setEncoding

public void setEncoding(java.lang.String encoding)
Encoding is the encoding of source files.

Parameters:
encoding - encoding of source files

getEncoding

public java.lang.String getEncoding()
see setEncoding(String)

See Also:
setEncoding(String)


Copyright © 2002-2008 Apache Software Foundation. All Rights Reserved.