Record Class RuleResult.RuleError
java.lang.Object
java.lang.Record
cloud.opencode.base.rules.RuleResult.RuleError
- Record Components:
ruleName- the rule that failed | 失败的规则message- the error message | 错误消息cause- the cause, may be null | 原因,可能为null
- Enclosing class:
RuleResult
public static record RuleResult.RuleError(String ruleName, String message, Throwable cause)
extends Record
Rule Error - Details about a rule execution failure
规则错误 - 规则执行失败的详细信息
- Since:
- JDK 25, opencode-base-rules V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncause()Returns the value of thecauserecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.static RuleResult.RuleErrorCreates a rule error without cause 创建没有原因的规则错误static RuleResult.RuleErrorCreates a rule error with cause 创建带原因的规则错误ruleName()Returns the value of theruleNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RuleError
-
-
Method Details
-
of
Creates a rule error without cause 创建没有原因的规则错误- Parameters:
ruleName- the rule name | 规则名称message- the error message | 错误消息- Returns:
- rule error instance | 规则错误实例
-
of
Creates a rule error with cause 创建带原因的规则错误- Parameters:
ruleName- the rule name | 规则名称message- the error message | 错误消息cause- the cause | 原因- Returns:
- rule error instance | 规则错误实例
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
ruleName
-
message
-
cause
-