org.apache.maven.jxr.pacman

Class FileManager

public class FileManager extends 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.

Method Summary
voidaddFile(JavaFile file)
Add a file to this filemanager.
StringgetEncoding()
see setEncoding(String)
JavaFilegetFile(String name)
Get a file from it's name.
static FileManagergetInstance()
Get an instance of the FileManager
voidsetEncoding(String encoding)
Encoding is the encoding of source files.

Method Detail

addFile

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

getEncoding

public String getEncoding()
see setEncoding(String)

See Also: setEncoding(String)

getFile

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

getInstance

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

setEncoding

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

Parameters: encoding encoding of source files

Copyright © {inceptionYear}-2008 Apache Software Foundation. All Rights Reserved.