Class ArgumentsUtils
- java.lang.Object
-
- org.eclipse.lemminx.services.extensions.commands.ArgumentsUtils
-
public class ArgumentsUtils extends Object
Arguments utilities.- Author:
- Angelo ZERR
-
-
Constructor Summary
Constructors Constructor Description ArgumentsUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ObjectgetArgAt(List<Object> arguments, int index)Returns the object from the given index and null otherwise.static <T> TgetArgAt(org.eclipse.lsp4j.ExecuteCommandParams params, int index, Class<T> clazz)Returns the object from the given index as a given class type and null otherwise.
-
-
-
Method Detail
-
getArgAt
public static Object getArgAt(List<Object> arguments, int index)
Returns the object from the given index and null otherwise.- Parameters:
arguments- the argument list.index- the index.- Returns:
- the object from the given index and null otherwise.
-
getArgAt
public static <T> T getArgAt(org.eclipse.lsp4j.ExecuteCommandParams params, int index, Class<T> clazz)Returns the object from the given index as a given class type and null otherwise.- Type Parameters:
T- the class type- Parameters:
params- the execute command parameters.index- the indexclazz- the class type.- Returns:
- the object from the given index as a given class type and null otherwise.
- Throws:
UnsupportedOperationException- if the object from the given index cannot be retrieved from the params.
-
-