Class ArgumentsUtils


  • public class ArgumentsUtils
    extends Object
    Arguments utilities.
    Author:
    Angelo ZERR
    • Constructor Detail

      • ArgumentsUtils

        public ArgumentsUtils()
    • 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 index
        clazz - 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.