code: @Override
      public void validateUpdate(IDataType newType) throws TypeUpdateException {
          super.validateUpdate(newType);
  
          HierarchicalType newHierarchicalType = (HierarchicalType) newType;
  
          //validate on supertypes
  
          if ((newHierarchicalType.superTypes.size() != superTypes.size())
                  || !newHierarchicalType.superTypes.containsAll(superTypes)) {
              throw new TypeUpdateException(newType, "New type cannot modify superTypes");
          }
  
          //validate on fields
          try {
              TypeUtils.validateUpdate(fieldMapping, newHierarchicalType.fieldMapping);
          } catch (TypeUpdateException e) {
              throw new TypeUpdateException(newType, e);
          }
      }
docs: Validate that current definition can be updated with the new definition
  @param newType
  @return true if the current definition can be updated with the new definition, else false