net.sourceforge.pmd
Class RuleReference

java.lang.Object
  extended by net.sourceforge.pmd.AbstractDelegateRule
      extended by net.sourceforge.pmd.RuleReference
All Implemented Interfaces:
Rule

public class RuleReference
extends AbstractDelegateRule

This class represents a Rule which is a reference to Rule defined in another RuleSet. All details of the Rule are delegated to the underlying referenced Rule, but those operations which modify overridden aspects of the rule are explicitly tracked. Modification operations which set a value to the current underlying value do not override.


Field Summary
 
Fields inherited from interface net.sourceforge.pmd.Rule
LOWEST_PRIORITY, PRIORITIES
 
Constructor Summary
RuleReference()
           
 
Method Summary
 void addExample(java.lang.String example)
          Add a single example for this Rule.
 void addProperties(java.util.Properties properties)
          Add a set of properties to this Rule.
 void addProperty(java.lang.String name, java.lang.String property)
          Add a specific property to this Rule.
 java.lang.String getOverriddenDescription()
           
 java.util.List<java.lang.String> getOverriddenExamples()
           
 java.lang.String getOverriddenExternalInfoUrl()
           
 java.lang.String getOverriddenMessage()
           
 java.lang.String getOverriddenName()
           
 java.lang.Integer getOverriddenPriority()
           
 java.util.Properties getOverriddenProperties()
           
 RuleSetReference getRuleSetReference()
           
 void setDescription(java.lang.String description)
          Set the description of this Rule.
 void setExternalInfoUrl(java.lang.String externalInfoUrl)
          Set a URL for external information about this Rule.
 void setMessage(java.lang.String message)
          Set the message to show when this Rule identifies a violation.
 void setName(java.lang.String name)
          Set the name of this Rule.
 void setPriority(int priority)
          Set the priority of this Rule.
 void setRuleSetReference(RuleSetReference ruleSetReference)
           
 
Methods inherited from class net.sourceforge.pmd.AbstractDelegateRule
addRuleChainVisit, apply, end, getBooleanProperty, getDescription, getDoubleProperty, getExample, getExamples, getExternalInfoUrl, getIntProperty, getMessage, getName, getPriority, getPriorityName, getProperties, getRule, getRuleChainVisits, getRuleClass, getRuleSetName, getSince, getStringProperty, hasProperty, include, propertyDescriptorFor, setInclude, setRule, setRuleClass, setRuleSetName, setSince, setUsesDFA, setUsesTypeResolution, start, usesDFA, usesRuleChain, usesTypeResolution
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleReference

public RuleReference()
Method Detail

getOverriddenName

public java.lang.String getOverriddenName()

setName

public void setName(java.lang.String name)
Description copied from interface: Rule
Set the name of this Rule.

Specified by:
setName in interface Rule
Overrides:
setName in class AbstractDelegateRule

getOverriddenProperties

public java.util.Properties getOverriddenProperties()

addProperty

public void addProperty(java.lang.String name,
                        java.lang.String property)
Description copied from interface: Rule
Add a specific property to this Rule.

Specified by:
addProperty in interface Rule
Overrides:
addProperty in class AbstractDelegateRule

addProperties

public void addProperties(java.util.Properties properties)
Description copied from interface: Rule
Add a set of properties to this Rule.

Specified by:
addProperties in interface Rule
Overrides:
addProperties in class AbstractDelegateRule

getOverriddenMessage

public java.lang.String getOverriddenMessage()

setMessage

public void setMessage(java.lang.String message)
Description copied from interface: Rule
Set the message to show when this Rule identifies a violation.

Specified by:
setMessage in interface Rule
Overrides:
setMessage in class AbstractDelegateRule

getOverriddenDescription

public java.lang.String getOverriddenDescription()

setDescription

public void setDescription(java.lang.String description)
Description copied from interface: Rule
Set the description of this Rule.

Specified by:
setDescription in interface Rule
Overrides:
setDescription in class AbstractDelegateRule

getOverriddenExamples

public java.util.List<java.lang.String> getOverriddenExamples()

addExample

public void addExample(java.lang.String example)
Description copied from interface: Rule
Add a single example for this Rule.

Specified by:
addExample in interface Rule
Overrides:
addExample in class AbstractDelegateRule

getOverriddenExternalInfoUrl

public java.lang.String getOverriddenExternalInfoUrl()

setExternalInfoUrl

public void setExternalInfoUrl(java.lang.String externalInfoUrl)
Description copied from interface: Rule
Set a URL for external information about this Rule.

Specified by:
setExternalInfoUrl in interface Rule
Overrides:
setExternalInfoUrl in class AbstractDelegateRule

getOverriddenPriority

public java.lang.Integer getOverriddenPriority()

setPriority

public void setPriority(int priority)
Description copied from interface: Rule
Set the priority of this Rule.

Specified by:
setPriority in interface Rule
Overrides:
setPriority in class AbstractDelegateRule

getRuleSetReference

public RuleSetReference getRuleSetReference()

setRuleSetReference

public void setRuleSetReference(RuleSetReference ruleSetReference)


Copyright © 2002-2011 InfoEther. All Rights Reserved.