public class Rule
extends java.lang.Object
Constructor and Description |
---|
Rule(java.lang.String name,
java.lang.String category,
java.lang.String enabled,
java.lang.String type,
java.lang.String value,
java.lang.String severity,
java.lang.String[] choices)
Creates a new Rule instance
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCategory()
Return the category of the Rule
|
java.lang.String[] |
getChoices()
If the Type is 'multchoice' get all the
possible choices in an array of Strings
|
java.lang.String |
getExamplePath()
Get the path of the example .html String
|
java.lang.String |
getName()
Returns the name of the Rule
|
int |
getSeverity()
Get the severity of the Rule
|
java.lang.String |
getType()
Get the Type of the Rule:
regexp
regexp-multiline
boolean
...
|
java.lang.String |
getValue()
Get the value to which the Rule is set
|
boolean |
isEnabled()
Is the Rule enabled
|
void |
setEnabled(boolean flag)
En-/disable the Rule
|
void |
setSeverity(int severity)
Set the Priority of the Rule
|
void |
setValue(java.lang.String value)
Set the value of the Rule
|
java.lang.String |
toString()
Returns a string representation of the object.
|
public Rule(java.lang.String name, java.lang.String category, java.lang.String enabled, java.lang.String type, java.lang.String value, java.lang.String severity, java.lang.String[] choices)
name
- category
- enabled
- type
- value
- severity
- choices
- public java.lang.String getName()
public java.lang.String getCategory()
public boolean isEnabled()
public void setEnabled(boolean flag)
flag
- public java.lang.String getType()
public java.lang.String getValue()
public void setValue(java.lang.String value)
value
- public int getSeverity()
public void setSeverity(int severity)
severity
- public java.lang.String[] getChoices()
public java.lang.String getExamplePath()
public java.lang.String toString()
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString
in class java.lang.Object
JCSC is released under the terms of the GNU General Public License