getType method
Returns the corresponding companion type from all companions with type type
Implementation
@override
CompanionType getType(String type) {
return _companionTypes.firstWhere(
(companionType) => companionType.getCompanionType() == type,
orElse: () => throw CompanionTypeNotFoundException(
"CompanionType with type $type was not found"),
);
}