Package org.apache.maven.jxr.pacman
Class JavaFileImpl
- java.lang.Object
-
- org.apache.maven.jxr.pacman.JavaFile
-
- org.apache.maven.jxr.pacman.JavaFileImpl
-
public class JavaFileImpl extends JavaFile
PacMan implementation of a JavaFile. This will parse out the file and determine package, class, and imports
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String>classTypes
-
Constructor Summary
Constructors Constructor Description JavaFileImpl(java.nio.file.Path path, java.lang.String encoding)Constructor of a new object that points to a given file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.io.ReadergetReader()private java.io.StreamTokenizergetTokenizer(java.io.Reader reader)Gets aStreamTokenizerfor this file.private voidparse()Opens up the file and try to determine package, class and import statements.private voidparseRecursive(java.lang.String nestedPrefix, java.io.StreamTokenizer stok)-
Methods inherited from class org.apache.maven.jxr.pacman.JavaFile
addClassType, addImportType, getClassType, getClassTypes, getEncoding, getFilename, getFilenameWithoutPathOrExtension, getImportTypes, getPackageType, getPath, setClassType, setPackageType
-
-
-
-
Constructor Detail
-
JavaFileImpl
public JavaFileImpl(java.nio.file.Path path, java.lang.String encoding) throws java.io.IOExceptionConstructor of a new object that points to a given file.- Parameters:
path- path of the fileencoding- encoding of the file- Throws:
java.io.IOException- on parsing failure
-
-
Method Detail
-
parse
private void parse() throws java.io.IOExceptionOpens up the file and try to determine package, class and import statements.- Throws:
java.io.IOException
-
parseRecursive
private void parseRecursive(java.lang.String nestedPrefix, java.io.StreamTokenizer stok) throws java.io.IOException- Throws:
java.io.IOException
-
getTokenizer
private java.io.StreamTokenizer getTokenizer(java.io.Reader reader)
Gets aStreamTokenizerfor this file.
-
getReader
private java.io.Reader getReader() throws java.io.IOException- Throws:
java.io.IOException
-
-