Groovy Documentation

org.codenarc.ruleset
Class XmlFileRuleSet

java.lang.Object
  org.codenarc.ruleset.XmlFileRuleSet

class XmlFileRuleSet

A RuleSet implementation that parses Rule definitions from XML read from a file. The filename passed into the constructor is interpreted relative to the classpath, by default, but may be optionally prefixed by any of the valid java.net.URL prefixes, such as "file:" (to load from a relative or absolute path on the filesystem), or "http:".

Note that this class attempts to read the file and parse the XML from within the constructor.

author:
Chris Mair
version:
$Revision: 207 $ - $Date: 2009-08-20 22:11:13 -0400 (Thu, 20 Aug 2009) $


Constructor Summary
XmlFileRuleSet(String path)

Construct a new instance on the specified RuleSet file path

 
Method Summary
List getRules()

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Constructor Detail

XmlFileRuleSet

public XmlFileRuleSet(String path)
Construct a new instance on the specified RuleSet file path
param:
path - the path to the XML RuleSet definition file. The path is relative to the classpath, by default, but may be optionally prefixed by any of the valid java.net.URL prefixes, such as "file:" (to load from a relative or absolute path on the filesystem), or "http:". The path must not be empty or null.


 
Method Detail

getRules

List getRules()
return:
a List of Rule objects


 

Groovy Documentation