protected function getAnnotationData() {
    $annotation_data = [
      'id' => $this->component_data['entity_type_id'],
      'label' => ClassAnnotation::Translation($this->component_data['entity_type_label']),
      'label_collection' => ClassAnnotation::Translation($this->component_data['entity_type_label'] . 's'),
      'label_singular' => ClassAnnotation::Translation(strtolower($this->component_data['entity_type_label'])),
      'label_plural' => ClassAnnotation::Translation(strtolower($this->component_data['entity_type_label']) . 's'),
      'label_count' => ClassAnnotation::PluralTranslation([
        'singular' => "@count " . strtolower($this->component_data['entity_type_label']),
        'plural' => "@count " . strtolower($this->component_data['entity_type_label']) . 's',
      ]),
      'entity_keys' => $this->component_data['entity_keys'],
    ];

    // Handlers.
    $handler_data = [];
    // Keep track of all the handler classes in a flat array keyed by the type
    // key so we don't have to work with the nested array for references to
    // other handlers.
    $handler_classes = [];
    foreach (static::getHandlerTypes() as $key => $handler_type_info) {
      $data_key = "handler_{$key}";

      // Skip if nothing in the data.
      if (empty($this->component_data[$data_key])) {
        continue;
      }

      // Strict comparison, as could be TRUE.
      if ($this->component_data[$data_key] === 'none') {
        continue;
      }

      $option_value = $this->component_data[$data_key];

      switch ($handler_type_info['mode']) {
        case 'core_default':
          // The FALSE case has been eliminated already, so must be TRUE.
          $handler_class = $this->makeQualifiedHandlerClassName($key, $handler_type_info);
          break;

        case 'core_none':
          if ($option_value == 'core') {
            $handler_class = substr($handler_type_info['base_class'], 1);
          }
          elseif ($option_value == 'custom') {
            $handler_class = $this->makeQualifiedHandlerClassName($key, $handler_type_info);
          }
          else {
            // Another option, specific to the handler type.
            $handler_class = substr($handler_type_info['options_classes'][$option_value], 1);
          }
          break;

        case 'custom_default':
          if ($option_value == 'default') {
            // Use a handler that's from another type.
            $handler_class = $handler_classes[$handler_type_info['default_type']];
          }
          else {
            $handler_class = $this->makeQualifiedHandlerClassName($key, $handler_type_info);
          }
          break;
      }

      $handler_classes[$key] = $handler_class;

      if (isset($handler_type_info['property_path'])) {
        NestedArray::setValue($handler_data, $handler_type_info['property_path'], $handler_class);
      }
      else {
        $handler_data[$key] = $handler_class;
      }
    }
    if ($handler_data) {
      $annotation_data['handlers'] = $handler_data;
    }

    if ($this->component_data['admin_permission_name']) {
      $annotation_data['admin_permission'] = $this->component_data['admin_permission_name'];
    }

    return $annotation_data;
  }