@Beta
 public static RegisteredType addTag(RegisteredType type, Object tag) {
   if (tag != null) {
     ((BasicRegisteredType) type).tags.add(tag);
   }
   return type;
 }
 @Beta
 public static RegisteredType addAlias(RegisteredType type, String alias) {
   if (alias != null) {
     ((BasicRegisteredType) type).aliases.add(alias);
   }
   return type;
 }
 @Beta
 public static RegisteredType addSuperType(RegisteredType type, @Nullable Class<?> superType) {
   if (superType != null) {
     ((BasicRegisteredType) type).superTypes.add(superType);
   }
   return type;
 }
 @Beta
 public static RegisteredType addSuperType(
     RegisteredType type, @Nullable RegisteredType superType) {
   if (superType != null) {
     if (isSubtypeOf(superType, type)) {
       throw new IllegalStateException(
           superType
               + " declares "
               + type
               + " as a supertype; cannot set "
               + superType
               + " as a supertype of "
               + type);
     }
     ((BasicRegisteredType) type).superTypes.add(superType);
   }
   return type;
 }