package saker.build.scripting.model.info
public class ScriptInfoUtils
Utility class containing functions for dealing with scripting model informations.
public static boolean | isCompatibleParameterName( Checks whether the given parameter name is acceptable for the place of the given parameter info. |
public static String | isStartsWithCompatibleParameterName( Same as isCompatibleParameterName( |
public static boolean isCompatibleParameterName(String parametername, TaskParameterInformation targetparaminfo)
Checks whether the given parameter name is acceptable for the place of the given parameter info.
The parameter name will be checked against the information provided in the target parameter information.
If the name of the target parameter is the wildcard ("*"
) then true
will be returned.
Else then true
will be returned if and only if the target parameter name or one of its aliases are
the same as the argument parameter name.
If the argument parameter name is null
, false
will be returned.
parameternameThe parameter name.
targetparaminfoThe target parameter information.
true
if the parameter name is compatible for the place of parameter information.public static String isStartsWithCompatibleParameterName(String startswithparametername, TaskParameterInformation targetparaminfo) throws NullPointerException
Same as isCompatibleParameterName(String, TaskParameterInformation) , but compares the possible target
parameter names with String.startsWith(String) relation.
startswithparameternameThe parameter to check if the target parameter name starts with.
targetparaminfoThe target parameter information.
The parameter name that is the one declared by the given parameter info and is compatible with the
argument, or
null
if incompatible.NullPointerExceptionIf any of the arguments are
null
.