11/**
22 * Provides classes and predicates for working with configuration files, such
3- * as Java .properties or .ini files.
3+ * as Java ` .properties` or ` .ini` files.
44 */
55
66import semmle.code.Location
77
8- /** Each element in a configuration file has a location. */
8+ /** An element in a configuration file has a location. */
99abstract class ConfigLocatable extends @configLocatable {
1010 /** Gets the source location for this element. */
1111 Location getLocation ( ) { configLocations ( this , result ) }
@@ -22,49 +22,49 @@ abstract class ConfigLocatable extends @configLocatable {
2222 * for applications, such as the port, name or address of a database.
2323 */
2424class ConfigPair extends @config, ConfigLocatable {
25- /** Gets the name of this ConfigPair, if any. */
25+ /** Gets the name of this ` ConfigPair` , if any. */
2626 ConfigName getNameElement ( ) { configNames ( result , this , _) }
2727
28- /** Gets the value of this ConfigPair, if any. */
28+ /** Gets the value of this ` ConfigPair` , if any. */
2929 ConfigValue getValueElement ( ) { configValues ( result , this , _) }
3030
3131 /**
32- * Gets the string value of the name of this ConfigPair if
32+ * Gets the string value of the name of this ` ConfigPair` if
3333 * it exists and the empty string if it doesn't.
3434 */
3535 string getEffectiveName ( ) {
3636 if exists ( getNameElement ( ) ) then result = getNameElement ( ) .getName ( ) else result = ""
3737 }
3838
3939 /**
40- * Gets the string value of the value of this ConfigPair if
40+ * Gets the string value of the value of this ` ConfigPair` if
4141 * it exists and the empty string if it doesn't.
4242 */
4343 string getEffectiveValue ( ) {
4444 if exists ( getValueElement ( ) ) then result = getValueElement ( ) .getValue ( ) else result = ""
4545 }
4646
47- /** Gets a printable representation of this ConfigPair. */
47+ /** Gets a printable representation of this ` ConfigPair` . */
4848 override string toString ( ) { result = getEffectiveName ( ) + "=" + getEffectiveValue ( ) }
4949}
5050
51- /** The name element of a ConfigPair. */
51+ /** The name element of a ` ConfigPair` . */
5252class ConfigName extends @configName, ConfigLocatable {
5353 /** Gets the name as a string. */
5454 string getName ( ) { configNames ( this , _, result ) }
5555
56- /** Gets a printable representation of this ConfigName. */
56+ /** Gets a printable representation of this ` ConfigName` . */
5757 override string toString ( ) { result = getName ( ) }
5858}
5959
60- /** The value element of a ConfigPair. */
60+ /** The value element of a ` ConfigPair` . */
6161class ConfigValue extends @configValue, ConfigLocatable {
6262 /** Gets the value as a string. */
6363 string getValue ( ) { configValues ( this , _, result ) }
6464
65- /** Gets a printable representation of this ConfigValue. */
65+ /** Gets a printable representation of this ` ConfigValue` . */
6666 override string toString ( ) { result = getValue ( ) }
6767}
6868
69- /** A Java property is a name-value pair in a .properties file. */
69+ /** A Java property is a name-value pair in a ` .properties` file. */
7070class JavaProperty extends ConfigPair { JavaProperty ( ) { getFile ( ) .getExtension ( ) = "properties" } }
0 commit comments