Class HiLiteDividers


  • public class HiLiteDividers
    extends java.lang.Object
    HiLiteDividers - Documentation.

    This class is designed to make improvements to the output generated by Java's "JavaDoc" program. Since using this package readily incorporates HTML pages into vectors, changing them, modifying them and improving them become easy. One feature that is easily implemented is adding code-hilighting to javadoc output files. Also, cleaning up some of the badly formatted HTML that Java-Doc will generate if the HTML used in comments is excessive also is very easy.

    HTML-DIV Class-NameRationale
    COMPLETE The HTML DIV element contains the complete method body of your java method. codeParameter 'java' will be sent to the HiLite.Me server to hilite the code in this code-documentation portion.
    EXAMPLE The DIV element contains java-code that serves as an example in your documentation. codeParameter 'java' will be sent to the HiLite.Me server to hilite the code in this code-documentation portion.
    METHODSIGNATUREThe DIV element you have provided java-doc is the signature of one of your java-methods, but doesn't include the method body. codeParameter 'java' will be sent to the HiLite.Me server to hilite the code in this code-documentation portion.
    SNIP The DIV element is expected to contain a "sub-section" of java code, not a complete method body. codeParameter 'java' will be sent to the server to hilite the code in this code-documentation portion.
    HTML This DIV element contains HTML code, and is intended to be seen as "escaped HTML" rather than "rendered HTML." codeParameter 'HTML' will be sent to the server when this code is hilited.
    JAVASCRIPT The DIV element contains "java-script" code. It should be viewed as hilited java-script. codeParameter 'js' will be used with the server. It may be an entire function definition, or merely a few lines, all are considered OK when using this class-name with a DIV in your documentation.
    LOC The DIV element will contain a single line of Java-Code. codeParameter 'java' will be used with the server.
    SHELL The DIV element will contain a single line of UNIX or MS-DOS shell code. The DIV contents will not be hilited, and the server will not be queried. Instead, a CSS-Style element will be inserted into the DIV that lightens the text, and darkens the background.
    SHELLBLOCK The DIV element will contain multiple lines of UNIX or MS-DOS shell code. The DIV contents will not be hilited, and the server will not be queried. Instead, a CSS-Style element will be inserted into the DIV that lightens the text, and darkens the background.
    REGEX The DIV element will contain Regular-Expression Data. It will be hilited, but The DIV contents will not be hilited by the server - which will not be queried. Instead, a CSS-Style element will be inserted into the DIV that lightens the text, and darkens the background.
    JSON The DIV element will contain data in the "Java Script Object Notation". codeParameter 'JSON' will be used with the server.
    CSS The DIV element will contain data in the "Cascading Style Sheets" format. codeParameter 'CSS' will be used with the server.
    XML The DIV element will contain data in the "Extensible Markup Language" format. codeParameter 'XML' will be used with the server.
    SQL The DIV element will contain data in the "Structured Query Language" format. codeParameter 'SQL' will be used with the server.


    NOTE: Any of the above options may include the sub-string '-SCROLL' in the class-name, and when this occurs, the HTML divider element that is inserted to encapsulate the code snippet, method, expression or LOC will have a Cascading-Style-Sheet property inserted into the <DIV STYLE="..."> style-attribute of the HTML divider element to ensure that the code-block does not expand past "20em" and that scroll-bars are properly included in the viewing area of the divider, if needed.
Stateless Class: This class neither contains any program-state, nor can it be instantiated.
The @StaticFunctional Annotation may also be called 'The Spaghetti Report'
  • 1 Constructor(s), 1 declared private, zero-argument constructor
  • 3 Method(s), 3 declared static
  • 8 Field(s), 8 declared static, 7 declared final
  • Fields excused from final modifier (with explanation):
    Field 'firstIteration' is not final. Reason: LOGGING


    • Field Summary

      Fields 
      Modifier and Type Field
      static String[] allClassNames
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method
      static int run​(CommonParamRecord pr)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • allClassNames

        public static final java.lang.String[] allClassNames
        This is the complete list of class-names that may be used in your '.java' files that may be recognized by the Java Documentation Assistant class ('this' class). These class-names are as follows:

        1
        2
        3
        4
        5
         public static final String[] all ClassNames = {
                  "COMPLETE", "EXAMPLE", "METHODSIGNATURE", "SNIP", "HTML", "LOC", "SHELL",
                  "SHELLBLOCK", "REGEX", "JAVASCRIPT", "JSON", "CSS", "XML", "SQL"
         };
         
        

        The mapping of what these key-words actually mean is displayed in the comments at the top of the package-description page.
        Code:
        Exact Field Declaration Expression:
        1
        public static final String[] allClassNames = (String[]) v.elementAt(0);
        
    • Method Detail

      • run

        public static int run​(CommonParamRecord pr)
        This method is the primary part of this class. It "modifies" all the DIV elements that I have inserted into the JavaDoc portion of all of my ".java" files. What I mean by "primary-section" is that the COMMENT-DIV elements that I have added all need to be updated to include the query-result code from the HiLite.ME server that I use. This is the whole point code snippets are hi-lited and inserted into the documentation.

        Each of the COMMENT-DIV's, without calling the HiLite.ME server, would look like an ordinary code section of a Java-Documentation HTML file. This class was written in order to make them to look like the Code-Hilited stuff from HiLite.ME

        NOTE: The ones that say SHELL, REGEX, and also SHELLBLOCK do not contact HiLite.ME, but rather insert the "special CSS Style" information (all listed at the top).
        Parameters:
        pr - This contains all of the needed parameters for this method, encapsulated into a single record-class. The list is somewhat lengthy, so this makes the code "look cleaner"
        Returns:
        This will return a count on exactly how many html dividers have had their code-hilited content hilited and reinserted into this JavaDoc Documentation File for this class.
        See Also:
        HiLiteMe, HiLiteMe.prettyPrintScrapeToVectorAndSimplify(String, String, String), Util.removeRange(Vector, int, int), InnerTagFindInclusive