类 ErrorCodeExtractor

java.lang.Object
io.github.tcq1007.valid.errorcode.util.ErrorCodeExtractor

public class ErrorCodeExtractor extends Object
Utility class for extracting error code values from enum constants
  • 方法详细资料

    • 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 element
      codeFieldName - The name of the error code field
      trees - The Trees instance for syntax tree analysis
      返回:
      The extracted error code value, or null if extraction fails