public enum CodeType extends Enum<CodeType>
Enum Constant and Description |
---|
EMAIL
邮件验证码
|
IMAGE
图片验证码
|
SMS
短信验证码
|
Modifier and Type | Method and Description |
---|---|
String |
getCode()
获取类型代码
|
String |
getName()
获取类型名称
|
static CodeType |
parse(String code)
根据名字解析出验证码类型
|
static CodeType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CodeType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CodeType SMS
public static final CodeType IMAGE
public static final CodeType EMAIL
public static CodeType[] values()
for (CodeType c : CodeType.values()) System.out.println(c);
public static CodeType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getCode()
public String getName()
Copyright © 2021. All rights reserved.