类 ErrorCodeExtractor
java.lang.Object
io.github.tcq1007.valid.errorcode.util.ErrorCodeExtractor
Utility class for extracting error code values from enum constants
-
方法概要
修饰符和类型方法说明static IntegerextractErrorCodeValue(Element enumConstant, String codeFieldName, Trees trees) Extract error code value from enum constant using multiple strategies
-
方法详细资料
-
extractErrorCodeValue
public static Integer extractErrorCodeValue(Element enumConstant, String codeFieldName, Trees trees) Extract error code value from enum constant using multiple strategies- 参数:
enumConstant- The enum constant elementcodeFieldName- The name of the error code fieldtrees- The Trees instance for syntax tree analysis- 返回:
- The extracted error code value, or null if extraction fails
-