code: public function attributeTypeMatchesFlags($name, $flags)
      {
          $factory = $this->getTypeFactory($name);
  
          // Shortcut, if all are valid, return all. :)
          if ($flags === self::FLAG_ALL) {
              return true;
          }
  
          return (($flags & self::FLAG_INCLUDE_TRANSLATED) && $factory->isTranslatedType())
              || (($flags & self::FLAG_INCLUDE_SIMPLE) && $factory->isSimpleType())
              || (($flags & self::FLAG_INCLUDE_COMPLEX) && $factory->isComplexType());
      }
docs: {@inheritdoc}