docs: protected <T> Schema<T> newSchema(Class<T> typeClass)
      {
          if (primaryGroup == null)
              return RuntimeSchema.createFrom(typeClass, this);
  
          final Schema<T> s = primaryGroup.getSchemaWrapper(typeClass, true).getSchema();
  
          // only pojos created by runtime schema support groups
          if (!(s instanceof RuntimeSchema))
              return s;
  
          final RuntimeSchema<T> rs = (RuntimeSchema<T>) s;
  
          // check if we need to filter
          if (rs.getFieldCount() == 0)
              return rs;
  
          final ArrayList<Field<T>> fields = new ArrayList<Field<T>>(rs.getFieldCount());
  
          for (Field<T> f : rs.getFields())
          {
              final int groupFilter = f.groupFilter;
              if (groupFilter != 0)
              {
                  final int set; // set for exclusion
                  if (groupFilter > 0)
                  {
                      // inclusion
                      set = ~groupFilter & 0x7FFFFFFF;
                  }
                  else
                  {
                      // exclusion
                      set = -groupFilter;
                  }
  
                  if (0 != (groupId & set))
                  {
                      // this field is excluded on the current group id
                      continue;
                  }
              }
  
              fields.add(f);
          }
  
          // The behavior has been changed to always allow messages with zero fields
          // regardless if it has a primary group or not.
          /*if (fields.size() == 0)
          {
              throw new RuntimeException("All fields were excluded for "
                      + rs.messageFullName() + " on group " + groupId);
          }*/
  
          return fields.size() == rs.getFieldCount() ? rs :
                  new RuntimeSchema<T>(typeClass, fields, rs.instantiator);
      }