Class MavenProperties
Deprecated.
Enhancement of the standard 
Properties
 managing the maintain of comments, etc.- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected static classDeprecated.TODOstatic classDeprecated.This class is used to read properties lines.static classDeprecated.This class is used to write properties lines.Nested classes/interfaces inherited from class java.util.AbstractMapAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> 
- 
Constructor SummaryConstructorsConstructorDescriptionDeprecated.MavenProperties(boolean substitute) Deprecated.MavenProperties(Path location) Deprecated.MavenProperties(Path location, boolean substitute) Deprecated.MavenProperties(Path location, UnaryOperator<String> callback) Deprecated.
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()Deprecated.static booleancontains(char[] array, char valueToFind) Deprecated.Checks if the value is in the given array.entrySet()Deprecated.protected static StringescapeJava(String str) Deprecated.Escapes the characters in aStringusing Java String rules.getComments(String key) Deprecated.Deprecated.Return the comment footer.Deprecated.Return the comment header.getProperty(String key) Deprecated.Searches for the property with the specified key in this property list.getProperty(String key, String defaultValue) Deprecated.Searches for the property with the specified key in this property list.Deprecated.protected static Stringhex(char ch) Deprecated.Returns an upper case hexadecimalStringfor the given character.voidload(InputStream is) Deprecated.voidDeprecated.voidDeprecated.voidDeprecated.protected voidloadLayout(Reader in, boolean maybeTyped) Deprecated.Reads a properties file and stores its internal structure.Enumeration<?> Deprecated.Returns an enumeration of all the keys in this property list, including distinct keys in the default property list if a key of the same name has not already been found from the main properties list.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.voidsave()Deprecated.voidsave(OutputStream os) Deprecated.voidDeprecated.voidDeprecated.protected voidsaveLayout(Writer out, boolean typed) Deprecated.Writes the properties file to the given writer, preserving as much of its structure as possible.voidDeprecated.Set the comment footer.voidDeprecated.Set the comment header.setProperty(String key, String value) Deprecated.Calls the map method put.voidstore(OutputStream os, String comment) Deprecated.Store a properties into a output stream, preserving comments, special character, etc.voidDeprecated.voidsubstitute(UnaryOperator<String> callback) Deprecated.protected static StringunescapeJava(String str) Deprecated.Unescapes any Java literals found in theStringto aWriter.booleanDeprecated.booleanupdate(MavenProperties properties) Deprecated.Methods inherited from class java.util.AbstractMapclone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, size, toString, valuesMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
- 
Constructor Details- 
MavenPropertiespublic MavenProperties()Deprecated.
- 
MavenProperties
- 
MavenPropertiesDeprecated.- Throws:
- IOException
 
- 
MavenPropertiespublic MavenProperties(boolean substitute) Deprecated.
- 
MavenPropertiesDeprecated.
 
- 
- 
Method Details- 
load
- 
load
- 
load
- 
load
- 
save
- 
save
- 
save
- 
save
- 
storeDeprecated.Store a properties into a output stream, preserving comments, special character, etc. This method is mainly to be compatible with the java.util.Properties class.- Parameters:
- os- an output stream.
- comment- this parameter is ignored as this Properties
- Throws:
- IOException- If storing fails
 
- 
getProperty
- 
getPropertyDeprecated.Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns the default value argument if the property is not found.- Parameters:
- key- the property key.
- defaultValue- a default value.
- Returns:
- The property value of the default value
 
- 
entrySet
- 
propertyNamesDeprecated.Returns an enumeration of all the keys in this property list, including distinct keys in the default property list if a key of the same name has not already been found from the main properties list.- Returns:
- an enumeration of all the keys in this property list, including the keys in the default property list.
 
- 
setPropertyDeprecated.Calls the map method put. Provided for parallelism with the getProperty method. Enforces use of strings for property keys and values. The value returned is the result of the map call to put.- Parameters:
- key- the key to be placed into this property list.
- value- the value corresponding to the key.
- Returns:
- the previous value of the specified key in this property list, or null if it did not have one.
 
- 
put
- 
put
- 
put
- 
put
- 
update
- 
updateDeprecated.
- 
getRaw
- 
getComments
- 
remove
- 
clear
- 
getHeader
- 
setHeader
- 
loadLayoutDeprecated.Reads a properties file and stores its internal structure. The found properties will be added to the associated configuration object.- Parameters:
- in- the reader to the properties file
- Throws:
- IOException- if an error occurs
 
- 
substitutepublic void substitute()Deprecated.
- 
substituteDeprecated.
- 
saveLayoutDeprecated.Writes the properties file to the given writer, preserving as much of its structure as possible.- Parameters:
- out- the writer
- Throws:
- IOException- if an error occurs
 
- 
unescapeJavaDeprecated.Unescapes any Java literals found in the This is a slightly modified version of the StringEscapeUtils.unescapeJava() function in commons-lang that doesn't drop escaped separators (i.e '\,').Stringto aWriter.- Parameters:
- str- the- Stringto unescape, may be null
- Returns:
- the processed string
- Throws:
- IllegalArgumentException- if the Writer is- null
 
- 
escapeJavaDeprecated.Escapes the characters in a Stringusing Java String rules.Deals correctly with quotes and control-chars (tab, backslash, cr, ff, etc.) So a tab becomes the characters '\\'and't'.The only difference between Java strings and JavaScript strings is that in JavaScript, a single quote must be escaped. Example: input string: He didn't say, "Stop!" output string: He didn't say, \"Stop!\" - Parameters:
- str- String to escape values in, may be null
- Returns:
- String with escaped values, nullif null string input
 
- 
hexDeprecated.Returns an upper case hexadecimal Stringfor the given character.- Parameters:
- ch- The character to convert.
- Returns:
- An upper case hexadecimal String
 
- 
containspublic static boolean contains(char[] array, char valueToFind) Deprecated.Checks if the value is in the given array. The method returns falseif anullarray is passed in.- Parameters:
- array- the array to search through
- valueToFind- the value to find
- Returns:
- trueif the array contains the object
 
 
-