1 package net.sourceforge.pmd;
2
3 /**
4 * @author Brian Remedios
5 */
6 public abstract class AbstractConfiguration {
7
8 private String sourceEncoding = System.getProperty("file.encoding");
9 private boolean debug;
10
11 protected AbstractConfiguration() {
12 super();
13 }
14
15 /**
16 * Get the character encoding of source files.
17 * @return The character encoding.
18 */
19 public String getSourceEncoding() {
20 return sourceEncoding;
21 }
22
23 /**
24 * Set the character encoding of source files.
25 * @param sourceEncoding The character encoding.
26 */
27 public void setSourceEncoding(String sourceEncoding) {
28 this.sourceEncoding = sourceEncoding;
29 }
30
31
32 /**
33 * Return the debug indicator. If this value is <code>true</code>
34 * then PMD will log debug information.
35 * @return <code>true</code> if debug logging is enabled, <code>false</code> otherwise.
36 */
37 public boolean isDebug() {
38 return debug;
39 }
40
41 /**
42 * Set the debug indicator.
43 * @param debug The debug indicator to set.
44 * @see #isDebug()
45 */
46 public void setDebug(boolean debug) {
47 this.debug = debug;
48 }
49 }