code: @Override
      public void validateDefault(InputProblemReporter rep, boolean normalize)
          throws XMLStreamException
      {
          // First, basic checks that it's a valid non-empty name:
          String def = validateDefaultName(rep, normalize);
  
          // And then that it's one of listed values:
          String shared = mEnumValues.find(def);
          if (shared == null) {
              reportValidationProblem(rep, "Invalid default value '"+def+"': has to be one of ("
                                      +mEnumValues+")");
          }
  
          // Ok, cool it's ok...
          if (normalize) {
              mDefValue.setValue(shared);
          }
      }
docs: Method called by the validator
  to ask attribute to verify that the default it has (if any) is
  valid for such type.