protected static boolean isRequired(Class<?> type, Param param) {
			if (!type.isPrimitive()) {
				return param.required();
			}
			if (type == boolean.class) {
				return !param.defaultBool().specified();
			}
			if (type == int.class) {
				return !param.defaultInt().specified();
			}
			if (type == long.class) {
				return !param.defaultLong().specified();
			}
			if (type == float.class) {
				return !param.defaultFloat().specified();
			}
			if (type == double.class) {
				return !param.defaultDouble().specified();
			}
			throw new IllegalArgumentException("Parameter type not allowed: " + type);
		}
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
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/model/target/iface/TraceObjectMethod.java