public final class CodegenConfiguratorUtils extends Object
This class exists to facilitate testing. These methods could be applied to CodegenConfigurator, but this complicates things when mocking CodegenConfigurator.
apply...Kvp take a string of comma-separated key-value pairs.apply...KvpList take a list of such strings.apply...Csv takes a string of comma-separated values.apply...CsvList takes a list of such strings.
The corresponding add... method on the passed configurator is called for each key-value pair (or value).
| Constructor and Description |
|---|
CodegenConfiguratorUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
applyAdditionalPropertiesKvp(String additionalProperties,
CodegenConfigurator configurator) |
static void |
applyAdditionalPropertiesKvpList(List<String> additionalProperties,
CodegenConfigurator configurator) |
static void |
applyGlobalPropertiesKvp(String globalProperties,
CodegenConfigurator configurator) |
static void |
applyGlobalPropertiesKvpList(List<String> globalProperties,
CodegenConfigurator configurator) |
static void |
applyImportMappingsKvp(String importMappings,
CodegenConfigurator configurator) |
static void |
applyImportMappingsKvpList(List<String> importMappings,
CodegenConfigurator configurator) |
static void |
applyInstantiationTypesKvp(String instantiationTypes,
CodegenConfigurator configurator) |
static void |
applyInstantiationTypesKvpList(List<String> instantiationTypes,
CodegenConfigurator configurator) |
static void |
applyLanguageSpecificPrimitivesCsv(String languageSpecificPrimitives,
CodegenConfigurator configurator) |
static void |
applyLanguageSpecificPrimitivesCsvList(List<String> languageSpecificPrimitives,
CodegenConfigurator configurator) |
static void |
applyReservedWordsMappingsKvp(String reservedWordMappings,
CodegenConfigurator configurator) |
static void |
applyReservedWordsMappingsKvpList(List<String> reservedWordMappings,
CodegenConfigurator configurator) |
static void |
applyServerVariablesKvp(String values,
CodegenConfigurator configurator) |
static void |
applyServerVariablesKvpList(List<String> values,
CodegenConfigurator configurator) |
static void |
applySystemPropertiesKvp(String systemProperties,
CodegenConfigurator configurator)
Deprecated.
This method is deprecated due to confusing between Java Sytsem Properties and generator-specific "system-level properties".
They've since been renamed as "Global Properties". Please use
applyGlobalPropertiesKvp(String, CodegenConfigurator). |
static void |
applySystemPropertiesKvpList(List<String> systemProperties,
CodegenConfigurator configurator)
Deprecated.
This method is deprecated due to confusion around the tool's use of system properties. We called these system properties
in the past and accepted them via CLI option -D. This lead to confusion between true Java System Properties and generator-specific
"system level properties". They've since been renamed as "Global Properties". Please use
applyGlobalPropertiesKvpList(List, CodegenConfigurator). |
static void |
applyTypeMappingsKvp(String typeMappings,
CodegenConfigurator configurator) |
static void |
applyTypeMappingsKvpList(List<String> typeMappings,
CodegenConfigurator configurator) |
@Deprecated public static void applySystemPropertiesKvpList(List<String> systemProperties, CodegenConfigurator configurator)
applyGlobalPropertiesKvpList(List, CodegenConfigurator).systemProperties - List of properties to be globally available throughout the generator execution.configurator - The CodegenConfigurator instance to configure.@Deprecated public static void applySystemPropertiesKvp(String systemProperties, CodegenConfigurator configurator)
applyGlobalPropertiesKvp(String, CodegenConfigurator).systemProperties - List of properties to be globally available throughout the generator execution.configurator - The CodegenConfigurator instance to configure.public static void applyGlobalPropertiesKvpList(List<String> globalProperties, CodegenConfigurator configurator)
public static void applyGlobalPropertiesKvp(String globalProperties, CodegenConfigurator configurator)
public static void applyInstantiationTypesKvpList(List<String> instantiationTypes, CodegenConfigurator configurator)
public static void applyInstantiationTypesKvp(String instantiationTypes, CodegenConfigurator configurator)
public static void applyImportMappingsKvpList(List<String> importMappings, CodegenConfigurator configurator)
public static void applyImportMappingsKvp(String importMappings, CodegenConfigurator configurator)
public static void applyTypeMappingsKvpList(List<String> typeMappings, CodegenConfigurator configurator)
public static void applyTypeMappingsKvp(String typeMappings, CodegenConfigurator configurator)
public static void applyAdditionalPropertiesKvpList(List<String> additionalProperties, CodegenConfigurator configurator)
public static void applyAdditionalPropertiesKvp(String additionalProperties, CodegenConfigurator configurator)
public static void applyServerVariablesKvpList(List<String> values, CodegenConfigurator configurator)
public static void applyServerVariablesKvp(String values, CodegenConfigurator configurator)
public static void applyLanguageSpecificPrimitivesCsvList(List<String> languageSpecificPrimitives, CodegenConfigurator configurator)
public static void applyLanguageSpecificPrimitivesCsv(String languageSpecificPrimitives, CodegenConfigurator configurator)
public static void applyReservedWordsMappingsKvpList(List<String> reservedWordMappings, CodegenConfigurator configurator)
public static void applyReservedWordsMappingsKvp(String reservedWordMappings, CodegenConfigurator configurator)
Copyright © 2020. All rights reserved.