Package ghidra.trace.model.target.iface
Class TraceMethod.ParameterDescription<T>
java.lang.Object
ghidra.trace.model.target.iface.TraceMethod.ParameterDescription<T>
- Type Parameters:
T- the type of the parameter
- Enclosing interface:
TraceMethod
A description of a method parameter
TODO: Should this be incorporated into schemas?
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidAdjust the argument for this parameterprotected static <T> TraceMethod.ParameterDescription<T> annotated(Class<T> type, TraceMethod.Param annot, String name) static TraceMethod.ParameterDescription<?> static <T> TraceMethod.ParameterDescription<T> Create a parameter having enumerated choicesstatic <T> TraceMethod.ParameterDescription<T> choices(Class<T> type, String name, Collection<T> choices, T defaultValue, String display, String description) Create a parameter having enumerated choicesstatic <T> TraceMethod.ParameterDescription<T> create(Class<T> type, String name, boolean required, T defaultValue, String display, String description) Create a parameterstatic <T> TraceMethod.ParameterDescription<T> create(Class<T> type, String name, boolean required, T defaultValue, String display, String description, String schema) Create a parameterbooleanExtract the argument for this parameterprotected static ObjectgetDefault(TraceMethod.Param annot) protected static <T> TgetDefault(Class<T> type, TraceMethod.Param annot) inthashCode()protected static booleanisRequired(Class<?> type, TraceMethod.Param param) voidSet the argument for this parametertoString()
-
Field Details
-
type
-
name
-
defaultValue
-
required
public final boolean required -
display
-
description
-
schema
-
choices
-
-
Method Details
-
create
public static <T> TraceMethod.ParameterDescription<T> create(Class<T> type, String name, boolean required, T defaultValue, String display, String description, String schema) Create a parameter- Type Parameters:
T- the type of the parameter- Parameters:
type- the class representing the type of the parametername- the name of the parameterrequired- true if this parameter must be provideddefaultValue- the default value of this parameterdisplay- the human-readable name of this parameterdescription- the human-readable description of this parameterschema- the parameter's schema- Returns:
- the new parameter description
-
create
public static <T> TraceMethod.ParameterDescription<T> create(Class<T> type, String name, boolean required, T defaultValue, String display, String description) Create a parameter- Type Parameters:
T- the type of the parameter- Parameters:
type- the class representing the type of the parametername- the name of the parameterrequired- true if this parameter must be provideddefaultValue- the default value of this parameterdisplay- the human-readable name of this parameterdescription- the human-readable description of this parameter- Returns:
- the new parameter description
-
choices
public static <T> TraceMethod.ParameterDescription<T> choices(Class<T> type, String name, Collection<T> choices, String display, String description) Create a parameter having enumerated choices- Type Parameters:
T- the type of the parameter- Parameters:
type- the class representing the type of the parametername- the name of the parameterchoices- the non-empty set of choices. The first is the default.display- the human-readable name of this parameterdescription- the human-readable description of this parameter- Returns:
- the new parameter description
-
choices
public static <T> TraceMethod.ParameterDescription<T> choices(Class<T> type, String name, Collection<T> choices, T defaultValue, String display, String description) Create a parameter having enumerated choices- Type Parameters:
T- the type of the parameter- Parameters:
type- the class representing the type of the parametername- the name of the parameterchoices- the non-empty set of choicesdefaultValue- the default value of this parameterdisplay- the human-readable name of this parameterdescription- the human-readable description of this parameter- Returns:
- the new parameter description
-
isRequired
-
getDefault
-
getDefault
-
annotated
protected static <T> TraceMethod.ParameterDescription<T> annotated(Class<T> type, TraceMethod.Param annot, String name) -
annotated
-
hashCode
public int hashCode() -
equals
-
get
Extract the argument for this parameterYou must validate the arguments, using
TraceMethod.validateArguments(Map, Map, boolean), first.- Parameters:
arguments- the validated arguments- Returns:
- the parameter
-
set
Set the argument for this parameter- Parameters:
arguments- the arguments to modifyvalue- the value to assign the parameter
-
adjust
Adjust the argument for this parameter- Parameters:
arguments- the arguments to modifyadjuster- a function of the old argument to the new argument. If the argument is not currently set, the function will receive null.
-
toString
-