Class Arguments

  • All Implemented Interfaces:
    java.io.Serializable , java.lang.Cloneable , java.lang.Iterable , org.apache.jmeter.config.ConfigElement , org.apache.jmeter.gui.Searchable , org.apache.jmeter.testelement.TestElement

    
    public class Arguments
    extends ConfigTestElement implements Serializable, Iterable<T>
                        

    A set of Argument objects.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Arguments() Create a new Arguments object with no arguments.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      ArgumentsSchema getSchema()
      PropertiesAccessor<out Arguments, out ArgumentsSchema> getProps() Allows type-safe accessors to the properties of the current element.
      CollectionProperty getArguments() Get the arguments.
      void clear() Clear the arguments.
      void setArguments(List<Argument> arguments) Set the list of arguments.
      Map<String, String> getArgumentsAsMap() Get the arguments as a Map.
      void addArgument(String name, String value) Add a new argument with the given name and value.
      void addArgument(Argument arg) Add a new argument.
      void addArgument(String name, String value, String metadata) Add a new argument with the given name, value, and metadata.
      void addArgument(String name, String value, String metadata, String description) Add a new argument with the given name, value, metadata and description
      PropertyIterator iterator() Get a PropertyIterator of the arguments.
      String toString() Create a string representation of the arguments.
      void removeArgument(int row) Remove the specified argument from the list.
      void removeArgument(Argument arg) Remove the specified argument from the list.
      void removeArgument(String argName) Remove the argument with the specified name.
      void removeArgument(String argName, String argValue) Remove the argument with the specified name and value.
      void removeAllArguments() Remove all arguments from the list.
      void addEmptyArgument() Add a new empty argument to the list.
      int getArgumentCount() Get the number of arguments in the list.
      Argument getArgument(int row) Get a single argument.
      • Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement

        addTestElement, canRemove, clearTestElementChildren, clone, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
      • Methods inherited from class org.apache.jmeter.config.ConfigTestElement

        addConfigElement, addTestElement, expectsModification
      • Methods inherited from class java.lang.Iterable

        forEach, spliterator
      • Methods inherited from class org.apache.jmeter.testelement.TestElement

        addTestElement, canRemove, clear, clearTestElementChildren, clone, get, get, get, get, get, get, get, get, get, getComment, getName, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProperty, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyOrNull, getProps, getSchema, getString, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, removed, set, setComment, setEnabled, setName, setProperty, setTemporary, traverse
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Arguments

        Arguments()
        Create a new Arguments object with no arguments.
    • Method Detail

      • getProps

         PropertiesAccessor<out Arguments, out ArgumentsSchema> getProps()

        Allows type-safe accessors to the properties of the current element. Note: when overriding the method, ensure you emit wildcards. For instance: JMeterElementInstance<? extends TestPlanClass> getProps() { return ... }

      • clear

         void clear()

        Clear the arguments.

      • setArguments

         void setArguments(List<Argument> arguments)

        Set the list of arguments. Any existing arguments will be lost.

        Parameters:
        arguments - the new arguments
      • getArgumentsAsMap

         Map<String, String> getArgumentsAsMap()

        Get the arguments as a Map. Each argument name is used as the key, and its value as the value.

        Returns:

        a new Map with String keys and values containing the arguments

      • addArgument

         void addArgument(String name, String value)

        Add a new argument with the given name and value.

        Parameters:
        name - the name of the argument
        value - the value of the argument
      • addArgument

         void addArgument(Argument arg)

        Add a new argument.

        Parameters:
        arg - the new argument
      • addArgument

         void addArgument(String name, String value, String metadata)

        Add a new argument with the given name, value, and metadata.

        Parameters:
        name - the name of the argument
        value - the value of the argument
        metadata - the metadata for the argument
      • addArgument

         void addArgument(String name, String value, String metadata, String description)

        Add a new argument with the given name, value, metadata and description

        Parameters:
        name - the name of the argument
        value - the value of the argument
        metadata - the metadata for the argument
        description - the argument description
      • toString

         String toString()

        Create a string representation of the arguments.

        Returns:

        the string representation of the arguments

      • removeArgument

         void removeArgument(int row)

        Remove the specified argument from the list.

        Parameters:
        row - the index of the argument to remove
      • removeArgument

         void removeArgument(Argument arg)

        Remove the specified argument from the list.

        Parameters:
        arg - the argument to remove
      • removeArgument

         void removeArgument(String argName)

        Remove the argument with the specified name.

        Parameters:
        argName - the name of the argument to remove
      • removeArgument

         void removeArgument(String argName, String argValue)

        Remove the argument with the specified name and value.

        Parameters:
        argName - the name of the argument to remove
        argValue - the value to compare - must not be null
      • addEmptyArgument

         void addEmptyArgument()

        Add a new empty argument to the list. The new argument will have the empty string as its name and value, and null metadata.

      • getArgumentCount

         int getArgumentCount()

        Get the number of arguments in the list.

        Returns:

        the number of arguments

      • getArgument

         Argument getArgument(int row)

        Get a single argument.

        Parameters:
        row - the index of the argument to return.
        Returns:

        the argument at the specified index, or null if no argument exists at that index.