Enum Class LogMasking.MaskingStrategy
java.lang.Object
java.lang.Enum<LogMasking.MaskingStrategy>
cloud.opencode.base.log.enhance.LogMasking.MaskingStrategy
- All Implemented Interfaces:
Serializable, Comparable<LogMasking.MaskingStrategy>, Constable
- Enclosing class:
LogMasking
Masking strategies for different data types.
不同数据类型的脱敏策略。
- Since:
- JDK 25, opencode-base-log V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAddress masking - 地址脱敏Bank card masking: ************1234 - 银行卡脱敏Custom masking - requires pattern rule - 自定义脱敏Email masking: u***@example.com - 邮箱脱敏Full masking: ****** - 全部隐藏ID card masking: 110***********1234 - 身份证脱敏Name masking: 张*三 - 姓名脱敏Password masking: [PROTECTED] - 密码脱敏Phone masking: 138****5678 - 手机号脱敏 -
Method Summary
Modifier and TypeMethodDescriptionabstract StringMasks the value.static LogMasking.MaskingStrategyReturns the enum constant of this class with the specified name.static LogMasking.MaskingStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FULL
Full masking: ****** - 全部隐藏 -
PHONE
Phone masking: 138****5678 - 手机号脱敏 -
EMAIL
Email masking: u***@example.com - 邮箱脱敏 -
ID_CARD
ID card masking: 110***********1234 - 身份证脱敏 -
BANK_CARD
Bank card masking: ************1234 - 银行卡脱敏 -
PASSWORD
Password masking: [PROTECTED] - 密码脱敏 -
NAME
Name masking: 张*三 - 姓名脱敏 -
ADDRESS
Address masking - 地址脱敏 -
CUSTOM
Custom masking - requires pattern rule - 自定义脱敏
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
mask
-