GP-3818: Create TraceRMI launcher framework. Launch script for gdb.

This commit is contained in:
Dan
2023-09-20 15:17:37 -04:00
parent 4561e8335d
commit eea90f49c9
379 changed files with 5180 additions and 1487 deletions

View File

@@ -280,7 +280,7 @@ public interface TargetMethod extends TargetObject {
* @param <T> the type of the parameter
* @param type the class representing the type of the parameter
* @param name the name of the parameter
* @param choices the non-empty set of choices
* @param choices the non-empty set of choices. The first is the default.
* @param display the human-readable name of this parameter
* @param description the human-readable description of this parameter
* @return the new parameter description
@@ -292,6 +292,27 @@ public interface TargetMethod extends TargetObject {
choices);
}
/**
* Create a parameter having enumerated choices
*
* @param <T> the type of the parameter
* @param type the class representing the type of the parameter
* @param name the name of the parameter
* @param choices the non-empty set of choices
* @param defaultValue the default value of this parameter
* @param display the human-readable name of this parameter
* @param description the human-readable description of this parameter
* @return the new parameter description
*/
public static <T> ParameterDescription<T> choices(Class<T> type, String name,
Collection<T> choices, T defaultValue, String display, String description) {
if (!choices.contains(defaultValue)) {
throw new IllegalArgumentException("Default must be one of the choices.");
}
return new ParameterDescription<>(type, name, false, defaultValue, display, description,
choices);
}
protected static boolean isRequired(Class<?> type, Param param) {
if (!type.isPrimitive()) {
return param.required();
@@ -440,7 +461,7 @@ public interface TargetMethod extends TargetObject {
}
if (required) {
throw new DebuggerIllegalArgumentException(
"Missing required parameter '" + name + "'");
"Missing required parameter '" + display + "' (" + name + ")");
}
return defaultValue;
}