Class EnumToAttributeAdapter<E extends Enum<E> & EnumToAttributeAdapter.EppEnum>

java.lang.Object
jakarta.xml.bind.annotation.adapters.XmlAdapter<google.registry.model.adapters.EnumToAttributeAdapter.EnumShim,E>
google.registry.model.adapters.EnumToAttributeAdapter<E>
Type Parameters:
E - the enum type
Direct Known Subclasses:
StatusValueAdapter

public class EnumToAttributeAdapter<E extends Enum<E> & EnumToAttributeAdapter.EppEnum> extends jakarta.xml.bind.annotation.adapters.XmlAdapter<google.registry.model.adapters.EnumToAttributeAdapter.EnumShim,E>
Used by JAXB to convert enums to the peculiar EPP format that puts the value in an attribute.
  • Constructor Details

    • EnumToAttributeAdapter

      public EnumToAttributeAdapter()
  • Method Details

    • unmarshal

      public E unmarshal(google.registry.model.adapters.EnumToAttributeAdapter.EnumShim shim)
      Specified by:
      unmarshal in class jakarta.xml.bind.annotation.adapters.XmlAdapter<google.registry.model.adapters.EnumToAttributeAdapter.EnumShim,E extends Enum<E> & EnumToAttributeAdapter.EppEnum>
    • marshal

      public final google.registry.model.adapters.EnumToAttributeAdapter.EnumShim marshal(E enumeration)
      Specified by:
      marshal in class jakarta.xml.bind.annotation.adapters.XmlAdapter<google.registry.model.adapters.EnumToAttributeAdapter.EnumShim,E extends Enum<E> & EnumToAttributeAdapter.EppEnum>