saker.compiler.utils Documentation TaskDoc JavaDoc Packages
public class CompilerUtils
Utility class containing functions for working with compiler related use-cases.
Methods
public static boolean
Checks if the identifiers should be a candidate for option merging.
public static boolean
canMergeLanguages(String targetlang, String optionslang)
Checks if the configurations can be merged for the argument languages.
public static boolean canMergeIdentifiers(CompilationIdentifier targetid, CompilationIdentifier optionsid)
Checks if the identifiers should be a candidate for option merging.

The method will determine if the options associated with optionsid can be merged into the configuration associated with targetid.

The method examines the following, in this order:
If optionsid is null, true is returned.
If targetid is null, false is returned.
If targetid contains all name parts specified in optionsid, then true is returned.
Otherwise the result is false.

targetidThe identifier of the target configuration in which the options are merged.
optionsidThe identifier of the option configuration that is being merged.
true if the options can be merged based on the semantics specified by this method.
public static boolean canMergeLanguages(String targetlang, String optionslang)
Checks if the configurations can be merged for the argument languages.

The method will check if the options associated with optionslang can be merged into the configuration associated with targetlang.

This method can be used when you want to constrain the option merging by a language property.

The method examines the following, in this order:
If optionslang is null or empty, true is returned.
If targetlang is null or empty, false is returned.
If targetlang equals to optionslang in an ignore-case manner, then true is returned.
Otherwise the result is false.

targetlangThe language of the target configuration in which the options are merged.
optionslangThe language of the option configuration that is being merged.
true if the options can be merged based on the semantics specified by this method.