Class ArgumentsUtils
java.lang.Object
org.eclipse.lemminx.services.extensions.commands.ArgumentsUtils
Arguments utilities.
- Author:
- Angelo ZERR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectReturns the object from the given index and null otherwise.static <T> TReturns the object from the given index as a given class type and null otherwise.
-
Constructor Details
-
ArgumentsUtils
public ArgumentsUtils()
-
-
Method Details
-
getArgAt
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.
-