org.codenarc.ruleset
[Groovy] Class XmlFileRuleSet
java.lang.Object
org.codenarc.ruleset.XmlFileRuleSet
- All Implemented Interfaces:
- RuleSet
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.
- Authors:
- Chris Mair
- Version:
- \$Revision: 439 \$ - \$Date: 2010-11-08 15:16:30 -0500 (Mon, 08 Nov 2010) \$
Constructor Summary |
XmlFileRuleSet(String path)
Construct a new instance on the specified RuleSet file path
|
Method Summary |
List
|
getRules()
@return a List of Rule objects
|
XmlFileRuleSet
XmlFileRuleSet(String path)
- Construct a new instance on the specified RuleSet file path
- Parameters:
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.
getRules
List getRules()
-
- Returns:
- a List of Rule objects
Groovy Documentation