Package org.apache.maven.jxr.pacman
Class FileManager
java.lang.Object
org.apache.maven.jxr.pacman.FileManager
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a file to this file manager.Gets the encoding of source files.Gets a file from its name.
If the file does not exist within the FileManager, creates a new one and returns it.voidsetEncoding(String encoding) Sets the encoding of source files.
-
Field Details
-
files
-
encoding
-
-
Constructor Details
-
FileManager
public FileManager()
-
-
Method Details
-
getFile
Gets a file from its name.
If the file does not exist within the FileManager, creates a new one and returns it.- Parameters:
path- path of the file- Returns:
- the
JavaFilemeta object for the specified file - Throws:
IOException- on parsing failure
-
addFile
Add a file to this file manager.- Parameters:
file- file to add
-
setEncoding
Sets the encoding of source files.- Parameters:
encoding- encoding of source files
-
getEncoding
Gets the encoding of source files.- Returns:
- encoding
-