public static ParameterDescription<?> annotated(Parameter parameter) {
			Param annot = parameter.getAnnotation(Param.class);
			if (annot == null) {
				throw new IllegalArgumentException(
					"Missing @" + Param.class.getSimpleName() + " on " + parameter);
			}
			String name = annot.name().equals("") ? parameter.getName() : annot.name();
			if (annot.choicesString().specified()) {
				if (parameter.getType() != String.class) {
					throw new IllegalArgumentException(
						"Can only specify choices for String parameter");
				}
				return ParameterDescription.choices(String.class, name,
					List.of(annot.choicesString().value()), annot.display(), annot.description(),
					annot.schema());
			}
			return annotated(MethodType.methodType(parameter.getType()).wrap().returnType(), annot,
				name);
		}
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