java.lang.Object
dev.civl.abc.config.IF.Configurations
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe language of the program being processed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Configurations.LanguagebestLanguage(Iterable<String> filenames) Finds the best language to use for translation based on filename extensions.static Configurations.LanguagebestLanguage(String[] filenames) Finds the best language to use for translation based on filename extensions.static Configurations.LanguageFinds best common language of mix of languages.static ConfigurationReturns newConfigurationobject in which all parameters have the lowest possible values allowed by the C Standard.
-
Constructor Details
-
Configurations
public Configurations()
-
-
Method Details
-
newMinimalConfiguration
Returns newConfigurationobject in which all parameters have the lowest possible values allowed by the C Standard.- Returns:
- new minimal configuration object
-
commonLanguage
Finds best common language of mix of languages. If all the given languages are the same, that is the common language. Else the common language isConfigurations.Language.CIVL_C.- Parameters:
langs- a sequence of languages, none of which isnull- Returns:
- the common language:
nullif the sequence is empty, the common language if all the languages are the same, elseConfigurations.Language.CIVL_C.
-
bestLanguage
Finds the best language to use for translation based on filename extensions.- Parameters:
filenames- sequence of non-nullstrings- Returns:
nullif sequence is empty, else aConfigurations.Languagedetermined as follows: if all filenames have a C extension (.c., .h, or .i), thenConfigurations.Language.C; else if all filenames have a Fortran extension,Configurations.Language.FORTRAN, elseConfigurations.Language.CIVL_C.
-
bestLanguage
Finds the best language to use for translation based on filename extensions.- Parameters:
filenames- array of non-nullstrings- Returns:
nullif sequence is empty, else aConfigurations.Languagedetermined as follows: if all filenames have a C extension (.c., .h, or .i), thenConfigurations.Language.C; else if all filenames have a Fortran extension,Configurations.Language.FORTRAN, elseConfigurations.Language.CIVL_C.
-