public class RuleReference extends AbstractDelegateRule
VIOLATION_SUPPRESS_REGEX_DESCRIPTOR, VIOLATION_SUPPRESS_XPATH_DESCRIPTOR| Constructor and Description |
|---|
RuleReference() |
RuleReference(Rule theRule,
RuleSetReference theRuleSetReference) |
| Modifier and Type | Method and Description |
|---|---|
void |
addExample(String example)
Add a single example for this Rule.
|
void |
definePropertyDescriptor(PropertyDescriptor<?> propertyDescriptor)
Define a new property via a PropertyDescriptor.
|
String |
getOverriddenDescription() |
List<String> |
getOverriddenExamples() |
String |
getOverriddenExternalInfoUrl() |
Language |
getOverriddenLanguage() |
LanguageVersion |
getOverriddenMaximumLanguageVersion() |
String |
getOverriddenMessage() |
LanguageVersion |
getOverriddenMinimumLanguageVersion() |
String |
getOverriddenName() |
RulePriority |
getOverriddenPriority() |
Map<PropertyDescriptor<?>,Object> |
getOverriddenPropertiesByPropertyDescriptor() |
List<PropertyDescriptor<?>> |
getOverriddenPropertyDescriptors() |
RuleSetReference |
getRuleSetReference() |
boolean |
hasDescriptor(PropertyDescriptor<?> descriptor)
Returns whether this Rule has the specified PropertyDescriptor.
|
boolean |
hasOverriddenProperty(PropertyDescriptor<?> descriptor) |
boolean |
isDeprecated()
Gets whether this Rule is deprecated.
|
Boolean |
isOverriddenDeprecated() |
void |
setDeprecated(boolean deprecated)
Sets whether this Rule is deprecated.
|
void |
setDescription(String description)
Set the description of this Rule.
|
void |
setExternalInfoUrl(String externalInfoUrl)
Set a URL for external information about this Rule.
|
void |
setLanguage(Language language)
Set the Language of this Rule.
|
void |
setMaximumLanguageVersion(LanguageVersion maximumLanguageVersion)
Set the maximum LanguageVersion to which this Rule applies.
|
void |
setMessage(String message)
Set the message to show when this Rule identifies a violation.
|
void |
setMinimumLanguageVersion(LanguageVersion minimumLanguageVersion)
Set the minimum LanguageVersion to which this Rule applies.
|
void |
setName(String name)
Set the name of this Rule.
|
void |
setPriority(RulePriority priority)
Set the priority of this Rule.
|
<T> void |
setProperty(PropertyDescriptor<T> propertyDescriptor,
T value)
Set the property value specified (will be type-checked)
|
void |
setRuleSetReference(RuleSetReference ruleSetReference) |
void |
useDefaultValueFor(PropertyDescriptor<?> desc)
Clears out any user-specified value for the property allowing it to use
the default value in the descriptor.
|
boolean |
usesDefaultValues()
Returns whether this Rule uses default values for properties.
|
addRuleChainVisit, addRuleChainVisit, apply, dysfunctionReason, end, getDescription, getExamples, getExternalInfoUrl, getLanguage, getMaximumLanguageVersion, getMessage, getMinimumLanguageVersion, getName, getParserOptions, getPriority, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, getRule, getRuleChainVisits, getRuleClass, getRuleSetName, getSince, ignoredProperties, setRule, setRuleClass, setRuleSetName, setSince, setUsesDFA, setUsesTypeResolution, start, usesDFA, usesRuleChain, usesTypeResolutionpublic RuleReference()
public RuleReference(Rule theRule, RuleSetReference theRuleSetReference)
public Language getOverriddenLanguage()
public void setLanguage(Language language)
RulesetLanguage in interface RulesetLanguage in class AbstractDelegateRulelanguage - the languagepublic LanguageVersion getOverriddenMinimumLanguageVersion()
public void setMinimumLanguageVersion(LanguageVersion minimumLanguageVersion)
RulesetMinimumLanguageVersion in interface RulesetMinimumLanguageVersion in class AbstractDelegateRuleminimumLanguageVersion - the minimum language versionpublic LanguageVersion getOverriddenMaximumLanguageVersion()
public void setMaximumLanguageVersion(LanguageVersion maximumLanguageVersion)
RulesetMaximumLanguageVersion in interface RulesetMaximumLanguageVersion in class AbstractDelegateRulemaximumLanguageVersion - the maximum language versionpublic Boolean isOverriddenDeprecated()
public boolean isDeprecated()
RuleisDeprecated in interface RuleisDeprecated in class AbstractDelegateRuletrue if this rule is deprecatedpublic void setDeprecated(boolean deprecated)
RulesetDeprecated in interface RulesetDeprecated in class AbstractDelegateRuledeprecated - whether this rule is deprecatedpublic String getOverriddenName()
public void setName(String name)
RulesetName in interface RulesetName in class AbstractDelegateRulename - the namepublic String getOverriddenMessage()
public void setMessage(String message)
RulesetMessage in interface RulesetMessage in class AbstractDelegateRulemessage - the message to show for a violation.public String getOverriddenDescription()
public void setDescription(String description)
RulesetDescription in interface RulesetDescription in class AbstractDelegateRuledescription - the descriptionpublic void addExample(String example)
RuleaddExample in interface RuleaddExample in class AbstractDelegateRuleexample - a single example to addpublic String getOverriddenExternalInfoUrl()
public void setExternalInfoUrl(String externalInfoUrl)
RulesetExternalInfoUrl in interface RulesetExternalInfoUrl in class AbstractDelegateRuleexternalInfoUrl - the URL for external information about this rule.public RulePriority getOverriddenPriority()
public void setPriority(RulePriority priority)
RulesetPriority in interface RulesetPriority in class AbstractDelegateRulepriority - the prioritypublic List<PropertyDescriptor<?>> getOverriddenPropertyDescriptors()
public void definePropertyDescriptor(PropertyDescriptor<?> propertyDescriptor) throws IllegalArgumentException
PropertySourcedefinePropertyDescriptor in interface PropertySourcedefinePropertyDescriptor in class AbstractDelegateRulepropertyDescriptor - The property descriptor.IllegalArgumentException - If there is already a property defined
the same name.public Map<PropertyDescriptor<?>,Object> getOverriddenPropertiesByPropertyDescriptor()
public <T> void setProperty(PropertyDescriptor<T> propertyDescriptor, T value)
PropertySourcesetProperty in interface PropertySourcesetProperty in class AbstractDelegateRuleT - The underlying type of the property descriptor.propertyDescriptor - The property descriptor.value - The value to set.public RuleSetReference getRuleSetReference()
public void setRuleSetReference(RuleSetReference ruleSetReference)
public boolean hasDescriptor(PropertyDescriptor<?> descriptor)
PropertySourcehasDescriptor in interface PropertySourcehasDescriptor in class AbstractDelegateRuledescriptor - The PropertyDescriptor for which to check.true if the descriptor is present,
false otherwise.PropertySource.hasDescriptor(PropertyDescriptor)public boolean hasOverriddenProperty(PropertyDescriptor<?> descriptor)
public boolean usesDefaultValues()
PropertySourcetrue if the properties all have default
values, false otherwise.public void useDefaultValueFor(PropertyDescriptor<?> desc)
PropertySourcedesc - the property to clear outCopyright © 2002-2014 InfoEther. All Rights Reserved.