| java.lang.Object net.sourceforge.pmd.RuleContext
RuleContext | public class RuleContext (Code) | | |
Constructor Summary | |
public | RuleContext() Default constructor. | public | RuleContext(RuleContext ruleContext) Constructor which shares attributes with the given RuleContext. |
RuleContext | public RuleContext()(Code) | | Default constructor.
|
RuleContext | public RuleContext(RuleContext ruleContext)(Code) | | Constructor which shares attributes with the given RuleContext.
|
getAttribute | public Object getAttribute(String name)(Code) | | Get an attribute value on the RuleContext.
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.
Parameters: name - The attribute name. The current attribute value, or null if the attribute does not exist. |
getSourceCodeFile | public File getSourceCodeFile()(Code) | | |
getSourceCodeFilename | public String getSourceCodeFilename()(Code) | | |
removeAttribute | public Object removeAttribute(String name)(Code) | | Remove an attribute value on the RuleContext.
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.
Parameters: name - The attribute name. The current attribute value, or null if the attribute does not exist. |
setAttribute | public boolean setAttribute(String name, Object value)(Code) | | Set an attribute value on the RuleContext, if it does not already exist.
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.
Parameters: name - The attribute name. Parameters: value - The attribute value. exception: IllegalArgumentException - if name or value are null true if the attribute was set, false otherwise. |
setSourceCodeFile | public void setSourceCodeFile(File sourceCodeFile)(Code) | | |
setSourceCodeFilename | public void setSourceCodeFilename(String filename)(Code) | | |
|
|