com.puppycrawl.tools.checkstyle
Class Configuration

java.lang.Object
  |
  +--com.puppycrawl.tools.checkstyle.Configuration
All Implemented Interfaces:
java.io.Serializable

public class Configuration
extends java.lang.Object
implements java.io.Serializable

Represents the configuration that checkstyle uses when checking. The configuration is Serializable, however the ClassLoader configuration is lost.

Author:
Oliver Burn
See Also:
Serialized Form

Constructor Summary
Configuration()
          Creates a new Configuration instance.
Configuration(java.util.Properties aProps, java.io.PrintStream aLog)
          Creates a new Configuration instance.
 
Method Summary
 java.lang.String getPackagePat()
           
 org.apache.regexp.RE getPackageRegexp()
           
 java.util.Properties getProperties()
           
 void setClassLoader(java.lang.ClassLoader aLoader)
          Set the class loader for locating classes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration(java.util.Properties aProps,
                     java.io.PrintStream aLog)
              throws org.apache.regexp.RESyntaxException,
                     java.io.FileNotFoundException,
                     java.io.IOException
Creates a new Configuration instance.

Parameters:
aProps - where to extract configuration parameters from
aLog - where to log errors to
Throws:
org.apache.regexp.RESyntaxException - if an error occurs
java.io.FileNotFoundException - if an error occurs
java.io.IOException - if an error occurs

Configuration

public Configuration()
Creates a new Configuration instance.

Throws:
java.lang.IllegalStateException - if an error occurs
Method Detail

setClassLoader

public void setClassLoader(java.lang.ClassLoader aLoader)
Set the class loader for locating classes.

Parameters:
aLoader - the class loader

getProperties

public java.util.Properties getProperties()
Returns:
a Properties object representing the current configuration. The returned object can be used to recreate the configuration. Tip: used on a default object returns all the default objects.

getPackagePat

public java.lang.String getPackagePat()
Returns:
pattern to match package names

getPackageRegexp

public org.apache.regexp.RE getPackageRegexp()
Returns:
regexp to match package names