Class JavaFile

java.lang.Object
org.apache.maven.jxr.pacman.JavaFile
Direct Known Subclasses:
JavaFileImpl

public abstract class JavaFile extends Object
Interface for objects which wish to provide meta-info about a JavaFile.
  • Field Details

  • Constructor Details

    • JavaFile

      protected JavaFile(Path path, String encoding)
  • Method Details

    • getImportTypes

      public Set<ImportType> getImportTypes()
      Gets the imported packages/files that this package has.
      Returns:
      import types
    • getClassType

      public ClassType getClassType()
      Gets the name of this class.
      Returns:
      class type
    • getClassTypes

      public List<ClassType> getClassTypes()
      Gets the names of the classes in this file.
      Returns:
      list of class types
    • getPackageType

      public PackageType getPackageType()
      Gets the package of this class.
      Returns:
      package type
    • addClassType

      public void addClassType(ClassType classType)
      Add a class type to the current list of class types.
      Parameters:
      classType - class type
    • addImportType

      public void addImportType(ImportType importType)
      Add an import type.
      Parameters:
      importType - import type
    • setClassType

      public void setClassType(ClassType classType)
      Sets the name of this class.
      Parameters:
      classType - class type
    • setPackageType

      public void setPackageType(PackageType packageType)
      Sets the package type of this class.
      Parameters:
      packageType - package type
    • getPath

      public Path getPath()
      Gets the path attribute.
      Returns:
      path
    • getFilename

      public String getFilename()
      Gets the file name without path and extension.
      Returns:
      file name
    • getEncoding

      public String getEncoding()
      Gets the encoding attribute.
      Returns:
      encoding
    • getFilenameWithoutPathOrExtension

      protected static String getFilenameWithoutPathOrExtension(Path path)
      Remove the path and the ".java" extension from a filename.
      Parameters:
      path - path to modify
      Returns:
      modified path