Package Torello.Java
Class HiLiteMe.Params
- java.lang.Object
-
- Torello.Java.HiLiteMe.Params
-
- Enclosing class:
- HiLiteMe
public static class HiLiteMe.Params extends java.lang.Object
Inner class for providing a list of parameters when hiliting multiple files on disk.
The purpose of this short inner class is to make the calls to thehttp://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.
Hi-Lited Source-Code:- View Here: Torello/Java/HiLiteMe.java
- Open New Browser-Tab: Torello/Java/HiLiteMe.java
File Size: 5,805 Bytes Line Count: 114 '\n' Characters Found
-
-
Field Summary
Default, Static String Constants Modifier and Type Field static String
DEFAULT_ENDING_HTML
static String
DEFAULT_HEADER_HTML
HTML Page Header & Footer Settings Modifier and Type Field String
endingHTML
String
headerHTML
Customizable Boolean-Flags Modifier and Type Field boolean
copyTextFiles
boolean
verbose
Choosing a Style Type Modifier and Type Field String
styleTag
Use a File-System Cache Modifier and Type Field HiLiteMe.Cache
cache
File-System Save-File Location Modifier and Type Field String
targetDirectory
Selecting which Source-Code or HTML Files to HiLite Modifier and Type Field TreeSet<String>
fileIndexList
Specifying per-File Style-Types Modifier and Type Field TreeMap<String,String>
customMappings
-
Constructor Summary
Constructors Constructor Description Params()
The public constructor has no body.
-
-
-
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:
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:
public static final String DEFAULT_ENDING_HTML = "\n</BODY>\n</HTML>\n";
-
styleTag
public java.lang.String styleTag
The style parameter to be used withHiLite.ME
View the list of availableStyle Tags
usingHiLiteMe.getStyleTypes()
-
verbose
public boolean verbose
When this isTRUE
,System.out
will print a line each time a file in theFileNode
tree is visited and sent to the pretty-printing HiLite servers.
-
targetDirectory
public java.lang.String targetDirectory
This is the target directory for where the output'.html'
files will be sent.
-
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 fromHiLite.ME
servers. The default version includes aMETA-UTF8
clause, because often higher-levelUni-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.
-
endingHTML
public java.lang.String endingHTML
This is the HTML that is appended to each pretty-printed source-code file received fromHiLite.ME
servers. The default version of thisjava.lang.String
simply contains<BODY>, </HTML>
- change this if necessary!.
-
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 parameterTreeSet
. Java'sTreeSet
stores things alphabetically, and does not allow duplicates. It can be used to generate an'index.html'
file. Send this field to theHiLiteMe.createIndex(TreeSet, String)
method to build the'index.html'
file. If this isnull
, files that are pretty-printed by thehttp://HiLite.ME/
server will just not be logged to this data-structure.
-
copyTextFiles
public boolean copyTextFiles
Any file that ends with".txt"
can be copied to thetargetDirectory
location - without being pretty printed if this variable is set toTRUE
.
-
customMappings
public java.util.TreeMap<java.lang.String,java.lang.String> customMappings
This is null by default. If it is not null, then eachjava.lang.string 'key'
in the Map should be a file ending, and the'value'
to which the key maps should be aCode Type
Tag that is recognized by the HiLite Pretty-Print HTML servers.
NOTE: It is important to know that the'keys'
in thisTreeMap
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 throughpublic Iterator<String> getCodeTypes()
- See Also:
HiLiteMe.getCodeTypes()
,HiLiteMe.isCodeType(String)
,HiLiteMe.deduceCodeType(String, TreeMap)
- Code:
- Exact Field Declaration Expression:
public TreeMap<String, String> customMappings = null;
-
cache
public HiLiteMe.Cache cache
Instantiate aCache
, and theHiLite.ME
server will save all code-String's
into a cache. For each source code request that is made which includes BOTH aParams
parameter class, AND a non-null'cache'
field, the logic will first check the code-cache to see if an identicalString
is in the cache. If theString
is identical, querying theHiLite.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:
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'
-
-