Package Torello.HTML.Tools.JavaDoc
Class JDFiles
- java.lang.Object
-
- Torello.HTML.Tools.JavaDoc.JDFiles
-
public class JDFiles extends java.lang.Object
JDFiles - Documentation.
This class is built inside a list of the file-names that are usually generated by the JavaDoc Utility. There are only two methods, but they are capable of retrieving the list of Java Doc Generated HTML Class Documentation Files - along with any package and page index information pages as well. Both of these methods only require a single parameter - the name of the directory that was used to output the JavaDoc Tool files.
IMPORTANT NOTE: It is absolutely not mandatory to use these two methods to retrieve the names of Java Documentation Files, but primarily, because this class has relatively good amounts of documentation itself (is that... 'self-aware?'), generally if trying to remember the names of files like 'package-info.html' along with the parameters to the file-system search methods, referencing this page might be of use if anybody were trying to use these JavaDoc Extension and Updgrade Java Classes.
Hi-Lited Source-Code:
- View Here: Torello/HTML/Tools/JavaDoc/JDFiles.java
- Open New Browser-Tab: Torello/HTML/Tools/JavaDoc/JDFiles.java
Stateless Class:
This class neither contains any program-state, nor can it be instantiated.
The
The
@StaticFunctional
Annotation may also be called 'The Spaghetti Report'- 1 Constructor(s), 1 declared private, zero-argument constructor
- 8 Method(s), 8 declared static
- 1 Field(s), 1 declared static, 1 declared final
-
-
Field Summary
Fields Modifier and Type Field static FilenameFilter
HTML_FILE_FILTER
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method static Stream<String>
getAllHTMLFiles(String rootJDOutDirName)
static Stream<String>
getHTMLFilesInRoot(String rootJDOutDirName)
static Stream<String>
getJavaClassHTMLFiles(String rootJDOutDirName)
static Stream<String>
getJavaPackageHTMLFiles(String rootJDOutDirName)
static Stream<String>
getPackageFrameHTMLFiles(String rootJDOutDirName)
static Stream<String>
getPackageSummaryHTMLFiles(String rootJDOutDirName)
static Stream<String>
getPackageTreeHTMLFiles(String rootJDOutDirName)
static Stream<String>
getSrcAsHTMLFiles(String rootJDOutDirName)
-
-
-
Field Detail
-
HTML_FILE_FILTER
public static final java.io.FilenameFilter HTML_FILE_FILTER
A JavaPredicate
that filters for'.html'
files.- Code:
- Exact Field Declaration Expression:
1 2
public static final FilenameFilter HTML_FILE_FILTER = (File dir, String name) -> name.trim().endsWith(".html");
-
-
Method Detail
-
getJavaClassHTMLFiles
public static java.util.stream.Stream<java.lang.String> getJavaClassHTMLFiles (java.lang.String rootJDOutDirName)
This method reads in the HTML files that JavaDoc generates for it's code documentation system, and returns the ones that are mapped to'.java'
files. Classes in this Java-HTML package such asHTMLNode
andFileNode
make working witg HTML output, and file-system directory trees very easy.
NOTE: This method accepts a directory name from the local file system. This must be the name of the directory to which the last call to javadoc left it's output HTML files- Parameters:
rootJDOutDirName
- This should be the directory-name (as aString
) of the last javadoc output directory. (Usually this is'javadoc/'
)- Returns:
- This will return the list of files as a Java
Stream<String>
. - Code:
- Exact Method Body:
1 2 3 4 5 6 7 8 9 10 11 12
return FileNode .createRoot(rootJDOutDirName) .loadTree(-1, HTML_FILE_FILTER, null) .flattenJustFiles(RetTypeChoice.FULLPATH_STREAM) .filter((String fileName) -> ! fileName.startsWith(rootJDOutDirName + "src-html" + File.separator)) .filter((String fileName) -> ! fileName.startsWith(rootJDOutDirName + "index-files" + File.separator)) .filter((String fileName) -> ! fileName.contains("package-summary.html")) .filter((String fileName) -> ! fileName.contains("package-tree.html")) .filter((String fileName) -> ! fileName.contains("package-frame.html")) .filter((String fileName) -> (StringParse.countCharacters(fileName, File.separator.charAt(0)) > 1)); // The previous filter prevents any ".html" files that are in the root java-doc output directory, // ... and are not inside one of the packages. If a class 'does not have a package' it will be skipped.
-
getSrcAsHTMLFiles
public static java.util.stream.Stream<java.lang.String> getSrcAsHTMLFiles (java.lang.String rootJDOutDirName)
This method reads in the HTML files which contain only the "Java Source Code" itself. The files that are returned in thisStream<String>
are not "Code Documentation Web-Pages," but rather they are the "Java Source Code" itself, after some minor 'conversion' to turn them into HTML Web-Browser viewable files.
NOTE: This method accepts a directory name from the local file system. This must be the name of the directory to which the last call to javadoc left it's output HTML files
IMPORTANT: The 'javadoc' tool, by default, will not generate the "HTML-ized" source-code files. The creation of these files has to be specifically requested at the command-line using the switch-linksource
. If this method is returning an emptyStream
, make sure that the last invocation of jthe avadoc tool specified this switch, or there will not be a/jd-root-dir/src-file/
directory in the first place.- Parameters:
rootJDOutDirName
- This should be the directory-name (as aString
) of the last javadoc output directory. (Usually this is'javadoc/'
)- Returns:
- This will return the list of files as a Java
Stream<String>
. - Code:
- Exact Method Body:
1 2 3 4
return FileNode .createRoot(rootJDOutDirName + "src-html" + File.separator) .loadTree(-1, HTML_FILE_FILTER, null) .flattenJustFiles(RetTypeChoice.FULLPATH_STREAM);
-
getJavaPackageHTMLFiles
public static java.util.stream.Stream<java.lang.String> getJavaPackageHTMLFiles (java.lang.String rootJDOutDirName)
This method reads in the HTML files that JavaDoc generates for it's code documentation system, and returns all of the'package-summary', 'package-tree', and 'package-frame'
files, and essentially, every file which is left out of the results returned for method:getJavaClassHTMLFiles(String)
NOTE: This method accepts a directory name from the local file system. This must be the name of the directory to which the last call to javadoc left it's output HTML files- Parameters:
rootJDOutDirName
- This should be the directory-name (as aString
) of the last javadoc output directory. (Usually this is'javadoc/'
)- Returns:
- This will return the list of files as a Java
Stream<String>
. - Code:
- Exact Method Body:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
return FileNode .createRoot(rootJDOutDirName) .loadTree(-1, HTML_FILE_FILTER, null) .flattenJustFiles(RetTypeChoice.FULLPATH_STREAM) .filter((String fileName) -> (! fileName.startsWith(rootJDOutDirName + "src-html" + File.separator)) && (! fileName.startsWith(rootJDOutDirName + "index-files" + File.separator)) ) .filter((String fileName) -> fileName.contains("package-summary.html") || fileName.contains("package-tree.html") || fileName.contains("package-frame.html") || (StringParse.countCharacters(fileName, File.separator.charAt(0)) <= 1) );
-
getAllHTMLFiles
public static java.util.stream.Stream<java.lang.String> getAllHTMLFiles (java.lang.String rootJDOutDirName)
This method reads in the HTML files that JavaDoc generates for it's code documentation system, and returns all of them
NOTE: This method accepts a directory name from the local file system. This must be the name of the directory to which the last call to javadoc left it's output HTML files- Parameters:
rootJDOutDirName
- This should be the directory-name (as aString
) of the last javadoc output directory. (Usually this is'javadoc/'
)- Returns:
- This will return the list of files as a Java
Stream<String>
. - Code:
- Exact Method Body:
1 2 3 4
return FileNode .createRoot(rootJDOutDirName) .loadTree(-1, HTML_FILE_FILTER, null) .flattenJustFiles(RetTypeChoice.FULLPATH_STREAM);
-
getPackageSummaryHTMLFiles
public static java.util.stream.Stream<java.lang.String> getPackageSummaryHTMLFiles (java.lang.String rootJDOutDirName)
This method reads in the HTML files that JavaDoc generates for it's code documentation system, and returns all files names "package-summary.html"
NOTE: This method accepts a directory name from the local file system. This must be the name of the directory to which the last call to javadoc left it's output HTML files
DESCRIPTION: A "Package Summary" Web-Page is the page that describes, briefly, the general goal of a Package in a Java JAR-File, or Java Tools Suite. It lists all classes present in the Package, and attempts to provide the first line of commenting for each class in an HTML Table with links to that class.- Parameters:
rootJDOutDirName
- This should be the directory-name (as aString
) of the last javadoc output directory. (Usually this is'javadoc/'
)- Returns:
- This will return the list of files as a Java
Stream<String>
. - Code:
- Exact Method Body:
1 2 3
return JDFiles .getJavaPackageHTMLFiles(rootJDOutDirName) .filter((String fileName) -> fileName.contains("package-summary.html"));
-
getPackageFrameHTMLFiles
public static java.util.stream.Stream<java.lang.String> getPackageFrameHTMLFiles (java.lang.String rootJDOutDirName)
This method reads in the HTML files that JavaDoc generates for it's code documentation system, and returns all files names "package-frame.html"
NOTE: This method accepts a directory name from the local file system. This must be the name of the directory to which the last call to javadoc left it's output HTML files
DESCRIPTION: A "Package Frame" Web-Page is the page that lists all classes present in the Package, and simply provides links to each class.- Parameters:
rootJDOutDirName
- This should be the directory-name (as aString
) of the last javadoc output directory. (Usually this is'javadoc/'
)- Returns:
- This will return the list of files as a Java
Stream<String>
. - Code:
- Exact Method Body:
1 2 3
return JDFiles .getJavaPackageHTMLFiles(rootJDOutDirName) .filter((String fileName) -> fileName.contains("package-frame.html"));
-
getHTMLFilesInRoot
public static java.util.stream.Stream<java.lang.String> getHTMLFilesInRoot (java.lang.String rootJDOutDirName)
This method reads in the HTML files in the Base JavaDoc Output Directory. This is usually something simple like'javadoc/'
NOTE: This method accepts a directory name from the local file system. This must be the name of the directory to which the last call to javadoc left it's output HTML files- Parameters:
rootJDOutDirName
- This should be the directory-name (as aString
) of the last javadoc output directory. (Usually this is'javadoc/'
)- Returns:
- This will return the list of files as a Java
Stream<String>
. - Code:
- Exact Method Body:
1 2 3 4
return FileNode .createRoot(rootJDOutDirName) .loadTree(1, HTML_FILE_FILTER, null) .flattenJustFiles(FileNode.RetTypeChoice.FULLPATH_STREAM);
-
getPackageTreeHTMLFiles
public static java.util.stream.Stream<java.lang.String> getPackageTreeHTMLFiles (java.lang.String rootJDOutDirName)
This method reads in the HTML files that JavaDoc generates for it's code documentation system, and returns all files names "package-tree.html"
NOTE: This method accepts a directory name from the local file system. This must be the name of the directory to which the last call to javadoc left it's output HTML files
DESCRIPTION: A "Package Tree" Web-Page is the page that lists all classes present in the Package, and builds an Object Hierarchy of those classes. Links are included to each class in this Object-Oriented Inheritance Hierarchy Tree.- Parameters:
rootJDOutDirName
- This should be the directory-name (as aString
) of the last javadoc output directory. (Usually this is'javadoc/'
)- Returns:
- This will return the list of files as a Java
Stream<String>
. - Code:
- Exact Method Body:
1 2 3
return JDFiles .getJavaPackageHTMLFiles(rootJDOutDirName) .filter((String fileName) -> fileName.contains("package-tree.html"));
-
-