|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.pmd.RuleContext
public class RuleContext
Constructor Summary | |
---|---|
RuleContext()
Default constructor. |
|
RuleContext(RuleContext ruleContext)
Constructor which shares attributes with the given RuleContext. |
Method Summary | |
---|---|
void |
excludeLines(java.util.Map<java.lang.Integer,java.lang.String> lines)
|
java.lang.Object |
getAttribute(java.lang.String name)
Get an attribute value on the RuleContext. |
Report |
getReport()
|
java.io.File |
getSourceCodeFile()
|
java.lang.String |
getSourceCodeFilename()
|
SourceType |
getSourceType()
|
java.lang.Object |
removeAttribute(java.lang.String name)
Remove an attribute value on the RuleContext. |
boolean |
setAttribute(java.lang.String name,
java.lang.Object value)
Set an attribute value on the RuleContext, if it does not already exist. |
void |
setReport(Report report)
|
void |
setSourceCodeFile(java.io.File sourceCodeFile)
|
void |
setSourceCodeFilename(java.lang.String filename)
|
void |
setSourceType(SourceType t)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RuleContext()
public RuleContext(RuleContext ruleContext)
Method Detail |
---|
public Report getReport()
public void setReport(Report report)
public java.io.File getSourceCodeFile()
public void setSourceCodeFile(java.io.File sourceCodeFile)
public java.lang.String getSourceCodeFilename()
public void setSourceCodeFilename(java.lang.String filename)
public void excludeLines(java.util.Map<java.lang.Integer,java.lang.String> lines)
public SourceType getSourceType()
public void setSourceType(SourceType t)
public boolean setAttribute(java.lang.String name, java.lang.Object value)
Attributes can be shared between RuleContext instances. This operation is thread-safe.
Attribute values should be modified directly via the reference provided.
It is not necessary to call setAttribute(String, Object)
to
update an attribute value. Modifications made to the attribute value
will automatically be seen by other threads. Because of this, you must
ensure the attribute values are themselves thread safe.
name
- The attribute name.value
- The attribute value.
true
if the attribute was set, false
otherwise.
java.lang.IllegalArgumentException
- if name
or value
are null
public java.lang.Object getAttribute(java.lang.String name)
Attributes can be shared between RuleContext instances. This operation is thread-safe.
Attribute values should be modified directly via the reference provided.
It is not necessary to call setAttribute(String, Object)
to
update an attribute value. Modifications made to the attribute value
will automatically be seen by other threads. Because of this, you must
ensure the attribute values are themselves thread safe.
name
- The attribute name.
null
if the attribute does not exist.public java.lang.Object removeAttribute(java.lang.String name)
Attributes can be shared between RuleContext instances. This operation is thread-safe.
Attribute values should be modified directly via the reference provided.
It is not necessary to call setAttribute(String, Object)
to
update an attribute value. Modifications made to the attribute value
will automatically be seen by other threads. Because of this, you must
ensure the attribute values are themselves thread safe.
name
- The attribute name.
null
if the attribute does not exist.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |