Package org.apache.maven.jxr.pacman
Class JavaFile
java.lang.Object
org.apache.maven.jxr.pacman.JavaFile
- Direct Known Subclasses:
JavaFileImpl
Interface for objects which wish to provide meta-info about a JavaFile.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate Stringprivate Set<ImportType> private PackageTypeprivate final Path -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClassType(ClassType classType) Add a class type to the current list of class types.voidaddImportType(ImportType importType) Add an import type.Gets the name of this class.Gets the names of the classes in this file.Gets the encoding attribute.Gets the file name without path and extension.protected static StringRemove the path and the ".java" extension from a filename.Gets the imported packages/files that this package has.Gets the package of this class.getPath()Gets the path attribute.voidsetClassType(ClassType classType) Sets the name of this class.voidsetPackageType(PackageType packageType) Sets the package type of this class.
-
Field Details
-
imports
-
classTypes
-
packageType
-
path
-
filename
-
encoding
-
-
Constructor Details
-
JavaFile
-
-
Method Details
-
getImportTypes
Gets the imported packages/files that this package has.- Returns:
- import types
-
getClassType
Gets the name of this class.- Returns:
- class type
-
getClassTypes
Gets the names of the classes in this file.- Returns:
- list of class types
-
getPackageType
Gets the package of this class.- Returns:
- package type
-
addClassType
Add a class type to the current list of class types.- Parameters:
classType- class type
-
addImportType
Add an import type.- Parameters:
importType- import type
-
setClassType
Sets the name of this class.- Parameters:
classType- class type
-
setPackageType
Sets the package type of this class.- Parameters:
packageType- package type
-
getPath
Gets the path attribute.- Returns:
- path
-
getFilename
Gets the file name without path and extension.- Returns:
- file name
-
getEncoding
Gets the encoding attribute.- Returns:
- encoding
-
getFilenameWithoutPathOrExtension
Remove the path and the ".java" extension from a filename.- Parameters:
path- path to modify- Returns:
- modified path
-