Search in sources :

Example 1 with LanguageSettingView

use of com.google.api.codegen.configgen.viewmodel.LanguageSettingView in project toolkit by googleapis.

the class LanguageTransformer method generateLanguageSettings.

List<LanguageSettingView> generateLanguageSettings(String packageName) {
    ImmutableList.Builder<LanguageSettingView> languageSettings = ImmutableList.builder();
    for (Map.Entry<TargetLanguage, LanguageFormatter> entry : LANGUAGE_FORMATTERS.entrySet()) {
        LanguageFormatter languageFormatter = entry.getValue();
        languageSettings.add(LanguageSettingView.newBuilder().language(entry.getKey().name().toLowerCase()).packageName(languageFormatter.getFormattedPackageName(packageName)).build());
    }
    return languageSettings.build();
}
Also used : LanguageFormatter(com.google.api.codegen.configgen.mergers.LanguageSettingsMerger.LanguageFormatter) LanguageSettingView(com.google.api.codegen.configgen.viewmodel.LanguageSettingView) ImmutableList(com.google.common.collect.ImmutableList) Map(java.util.Map) TargetLanguage(com.google.api.codegen.common.TargetLanguage)

Aggregations

TargetLanguage (com.google.api.codegen.common.TargetLanguage)1 LanguageFormatter (com.google.api.codegen.configgen.mergers.LanguageSettingsMerger.LanguageFormatter)1 LanguageSettingView (com.google.api.codegen.configgen.viewmodel.LanguageSettingView)1 ImmutableList (com.google.common.collect.ImmutableList)1 Map (java.util.Map)1