Package Torello.Java

Class HiLiteMe.Params

  • Enclosing class:
    HiLiteMe

    public static class HiLiteMe.Params
    extends java.lang.Object
    HiLiteMe Parameter - Documentation.

    The purpose of this short inner class is to make the calls to the http://HiLite.ME/ servers a little more customize-able. Their are no methods in this class; instead each field is left public and can be modified directly be the user. Getter and Setter methods are eliminated for brevity.



    • Field Detail

      • DEFAULT_HEADER_HTML

        public static final java.lang.String DEFAULT_HEADER_HTML
        The default value for 'headerHTML' This value may be reset by accessing the field 'headerHTML', which is a 'public' field in this class.
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        2
        3
        public static final String DEFAULT_HEADER_HTML =
                    "<HTML>\n<HEAD>\n<META http-equiv=\"Content-Type\" content=\"text/html; " +
                    "charset=utf-8\" />\n<TITLE>INSERT HERE</TITLE>\n</HEAD>\n<BODY>\n";
        
      • DEFAULT_ENDING_HTML

        public static final java.lang.String DEFAULT_ENDING_HTML
        The default value for 'endingHTML' This value may be reset by accessing the field 'endingHTML', which is a 'public' field in this class.
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String DEFAULT_ENDING_HTML = "\n</BODY>\n</HTML>\n";
        
      • styleTag

        public java.lang.String styleTag
        The style parameter to be used with HiLite.ME View the list of available Style Tags using HiLiteMe.getStyleTypes()
        Code:
        Exact Field Declaration Expression:
        1
        public String styleTag = "native";
        
      • verbose

        public boolean verbose
        When this is TRUE, System.out will print a line each time a file in the FileNode tree is visited and sent to the pretty-printing HiLite servers.
        Code:
        Exact Field Declaration Expression:
        1
        public boolean verbose = true;
        
      • targetDirectory

        public java.lang.String targetDirectory
        This is the target directory for where the output '.html' files will be sent.
        Code:
        Exact Field Declaration Expression:
        1
        public String targetDirectory = "";
        
      • headerHTML

        public java.lang.String headerHTML
        This is the header HTML that is inserted above each post-processed / pretty-printed source-code file that is received from HiLite.ME servers. The default version includes a META-UTF8 clause, because often higher-level Uni-Code characters from Mandarin Chinese, Spanish, Korean, Vietnamese and other foreign languages are in (the writer, Torello's code).

        NOTE: The header must have a sub-string that says (in all caps) "INSERT HERE" - the file name will be inserted.
        Code:
        Exact Field Declaration Expression:
        1
        public String headerHTML = DEFAULT_HEADER_HTML;
        
      • endingHTML

        public java.lang.String endingHTML
        This is the HTML that is appended to each pretty-printed source-code file received from HiLite.ME servers. The default version of this java.lang.String simply contains <BODY>, </HTML> - change this if necessary!.
        Code:
        Exact Field Declaration Expression:
        1
        public String endingHTML = DEFAULT_ENDING_HTML;
        
      • fileIndexList

        public java.util.TreeSet<java.lang.String> fileIndexList
        This will store each file that is successfully converted into a "Pretty Printed HTML" file in the passed parameter TreeSet. Java's TreeSet stores things alphabetically, and does not allow duplicates. It can be used to generate an 'index.html' file. Send this field to the HiLiteMe.createIndex(TreeSet, String) method to build the 'index.html' file. If this is null, files that are pretty-printed by the http://HiLite.ME/ server will just not be logged to this data-structure.
        Code:
        Exact Field Declaration Expression:
        1
        public TreeSet<String> fileIndexList = new TreeSet<String>();
        
      • copyTextFiles

        public boolean copyTextFiles
        Any file that ends with ".txt" can be copied to the targetDirectory location - without being pretty printed if this variable is set to TRUE.
        Code:
        Exact Field Declaration Expression:
        1
        public boolean copyTextFiles = true;
        
      • customMappings

        public java.util.TreeMap<java.lang.String,​java.lang.String> customMappings
        This is null by default. If it is not null, then each java.lang.string 'key' in the Map should be a file ending, and the 'value' to which the key maps should be a Code Type Tag that is recognized by the HiLite Pretty-Print HTML servers.

        NOTE: It is important to know that the 'keys' in this TreeMap data-structure are valid file-name extensions, that leave out the leading '.' (period). The key should be 'java' not '.java'. Furthermore, the values in the data-structure to which these keys map, should be valid HiLiteMe Pretty-Print Servers code-type values. The complete list of valid 'Code Types' can be viewed by iterating through public Iterator<String> getCodeTypes()
        See Also:
        HiLiteMe.getCodeTypes(), HiLiteMe.isCodeType(String), HiLiteMe.deduceCodeType(String, TreeMap)
        Code:
        Exact Field Declaration Expression:
        1
        public TreeMap<String, String> customMappings = null;
        
      • cache

        public HiLiteMe.Cache cache
        Instantiate a Cache, and the HiLite.ME server will save all code-String's into a cache. For each source code request that is made which includes BOTH a Params parameter class, AND a non-null 'cache' field, the logic will first check the code-cache to see if an identical String is in the cache. If the String is identical, querying the HiLite.ME server will be skipped, and the local copy used instead. This can increase build time many-fold, as seconds are reduced to milliseconds in large builds where only 2 or 3 classes have seen code-changes since a previous build.
        See Also:
        HiLiteMe.Cache
        Code:
        Exact Field Declaration Expression:
        1
        public Cache cache = null;
        
    • Constructor Detail

      • Params

        public Params()
        The public constructor has no body. Modify the constants as necessary - since the fields are all 'public', and are not 'final'