Package org.forgerock.json.jose.jwk
Enum KeyType
- java.lang.Object
-
- java.lang.Enum<KeyType>
-
- org.forgerock.json.jose.jwk.KeyType
-
- All Implemented Interfaces:
Serializable
,Comparable<KeyType>
public enum KeyType extends Enum<KeyType>
Enum representing the possible KeyTypes.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static KeyType
getKeyType(String keyType)
Get the KeyType given a string.Set<String>
getRequiredFields()
The minimum set of fields that are required for a JWK of this type.String
toString()
Gets the value of the KeyType.String
value()
Get the value of the KeyType.static KeyType
valueOf(String name)
Returns the enum constant of this type with the specified name.static KeyType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Method Detail
-
values
public static KeyType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (KeyType c : KeyType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static KeyType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
value
public String value()
Get the value of the KeyType.- Returns:
- the value of the KeyType
-
getRequiredFields
public Set<String> getRequiredFields()
The minimum set of fields that are required for a JWK of this type.- Returns:
- the minimum set of fields for this type of JWK.
-
getKeyType
public static KeyType getKeyType(String keyType)
Get the KeyType given a string.- Parameters:
keyType
- string representing the KeyType- Returns:
- a KeyType or null if given null KeyType
-
-