- All Implemented Interfaces:
Serializable, Comparable<Edns.OptionCode>, java.lang.constant.Constable
- Enclosing class:
Edns
The EDNS option code.
- See Also:
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Enum Constant Summary
Enum ConstantsField Summary
Modifier and TypeFieldDescriptionfinal intNumeric EDNS option code carried on the wire.final Class<? extends EdnsOption> Option class registered for that code, or null for an unknown one.private static Map<Integer, Edns.OptionCode> The option codes, by number.Constructor Summary
ConstructorsModifierConstructorDescriptionprivateOptionCode(int optionCode, Class<? extends EdnsOption> clazz) Names one option type.Method Summary
All MethodsModifier and TypeMethodDescriptionstatic Edns.OptionCodefrom(int optionCode) Looks up the registered option for a numeric EDNS option code.static Edns.OptionCodeReturns the enum constant of this class with the specified name.static Edns.OptionCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
Enum Constant Details
UNKNOWN
Unknown option codeNSID
NSID option
Field Details
INVERSE_LUT
The option codes, by number.asInt
public final int asIntNumeric EDNS option code carried on the wire.clazz
Option class registered for that code, or null for an unknown one.
Constructor Details
OptionCode
Names one option type.- Parameters:
optionCode- the number of the optionclazz- the class of the option
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
from
Looks up the registered option for a numeric EDNS option code.- Parameters:
optionCode- the numeric EDNS option code to look up- Returns:
- the matching OptionCode, or UNKNOWN if no option is registered for that code