Class Args
java.lang.Object
org.spongepowered.asm.mixin.injection.invoke.arg.Args
Argument bundle class used in
ModifyArgs callbacks. See the
documentation for ModifyArgs for details. Synthetic subclasses are
generated at runtime for specific injectors.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
values
Argument values
-
-
Constructor Details
-
Args
Ctor.- Parameters:
values- argument values
-
-
Method Details
-
size
public int size()Return the argument list size.- Returns:
- number of arguments available
-
get
public <T> T get(int index) Retrieve the argument value at the specified index- Type Parameters:
T- the argument type- Parameters:
index- argument index to retrieve- Returns:
- the argument value
- Throws:
ArrayIndexOutOfBoundsException- if a value outside the range of available arguments is accessed
-
set
public abstract <T> void set(int index, T value) Set (modify) the specified argument value. Internal verification is performed upon supplied values and the following requirements are enforced:- Reference types must be assignable to the object type, or can be null.
- Primitive types must match the target types exactly and cannot be null.
- Type Parameters:
T- Argument type- Parameters:
index- Argument index to setvalue- Argument value- Throws:
ArgumentIndexOutOfBoundsException- if the specified argument index is outside the range of available arguments
-
setAll
Set (modify) all argument values. The number and type of arguments supplied to this method must precisely match the argument types in the bundle. Seeset(int, Object)for details.- Parameters:
values- Argument values to set
-