Serializablepublic final class Caution extends Throwable
When one of the detection rules defined in HiChecker.Rule is applied, the system creates a Caution
object as the parameter of HiChecker.OnCautionListenser#onCautionFound(Caution). The object contains the
caution detection rule, custom caution information, and stack information.
| 限定符 | 构造器 | 说明 |
|---|---|---|
protected |
Caution(HiChecker.Rule rule,
String customMessage) |
create Caution with type and custom caution message
|
protected |
Caution(HiChecker.Rule rule,
String customMessage,
Throwable cause) |
create Caution with type and custom caution message.
|
protected Caution(HiChecker.Rule rule, String customMessage)
protected Caution(HiChecker.Rule rule, String customMessage, Throwable cause)
public HiChecker.Rule getTriggerRule()
Each caution has a unique detection rule, which can be used to distinguish caution types.
public String getCustomMessage()
More auxiliary information is provided for some types of cautions.
null otherwise.