org.apache.jmeter.config

## Class Argument

- java.lang.Object
- - org.apache.jmeter.testelement.AbstractTestElement
  - - org.apache.jmeter.config.Argument

- All Implemented Interfaces:
    Serializable, Cloneable, Searchable, TestElement
  Direct Known Subclasses:
    HTTPArgument

      public class Argument
      extends AbstractTestElement
      implements Serializable

  Class representing an argument. Each argument consists of a name/value pair, as well as (optional) metadata.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ARG_NAME` Name used to store the argument's name.
    `static String` | `DESCRIPTION` Name used to store the argument's description.
    `static String` | `METADATA` Name used to store the argument's metadata.
    `static String` | `VALUE` Name used to store the argument's value.

    - ### Fields inherited from interface org.apache.jmeter.testelement.TestElement

      `COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Argument()` Create a new Argument without a name, value, or metadata.
    `Argument(String name, String value)` Create a new Argument with the specified name and value, and no metadata.
    `Argument(String name, String value, String metadata)` Create a new Argument with the specified name, value, and metadata.
    `Argument(String name, String value, String metadata, String description)` Create a new Argument with the specified name, value, and metadata.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getDescription()` Gets the Meta Data attribute of the Argument.
    `String` | `getMetaData()` Gets the Meta Data attribute of the Argument.
    `String` | `getName()` Get the name of the Argument.
    `String` | `getValue()` Gets the value of the Argument object.
    `boolean` | `isSkippable(String parameterName)` Is this parameter skippable, i.e.
    `void` | `setDescription(String description)` Sets the Description attribute of the Argument.
    `void` | `setMetaData(String newMetaData)` Sets the Meta Data attribute of the Argument.
    `void` | `setName(String newName)` Set the name of the Argument.
    `void` | `setValue(String newValue)` Sets the value of the Argument.
    `String` | `toString()`

    - ### Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement

      `addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.jmeter.testelement.TestElement

      `removed`

- - ### Field Detail

    - #### ARG_NAME

          public static final String ARG_NAME

      Name used to store the argument's name.
      See Also:
        Constant Field Values

    - #### VALUE

          public static final String VALUE

      Name used to store the argument's value.
      See Also:
        Constant Field Values

    - #### DESCRIPTION

          public static final String DESCRIPTION

      Name used to store the argument's description.
      See Also:
        Constant Field Values

    - #### METADATA

          public static final String METADATA

      Name used to store the argument's metadata.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Argument

          public Argument()

      Create a new Argument without a name, value, or metadata.

    - #### Argument

          public Argument(String name,
                          String value)

      Create a new Argument with the specified name and value, and no metadata.
      Parameters:
        `name` - the argument name
        `value` - the argument value

    - #### Argument

          public Argument(String name,
                          String value,
                          String metadata)

      Create a new Argument with the specified name, value, and metadata.
      Parameters:
        `name` - the argument name
        `value` - the argument value
        `metadata` - the argument metadata

    - #### Argument

          public Argument(String name,
                          String value,
                          String metadata,
                          String description)

      Create a new Argument with the specified name, value, and metadata.
      Parameters:
        `name` - the argument name
        `value` - the argument value
        `metadata` - the argument metadata
        `description` - the argument description

  - ### Method Detail

    - #### setName

          public void setName(String newName)

      Set the name of the Argument.
      Specified by:
        `setName` in interface `TestElement`
      Overrides:
        `setName` in class `AbstractTestElement`
      Parameters:
        `newName` - the new name

    - #### getName

          public String getName()

      Get the name of the Argument.
      Specified by:
        `getName` in interface `TestElement`
      Overrides:
        `getName` in class `AbstractTestElement`
      Returns:
        the attribute's name

    - #### setValue

          public void setValue(String newValue)

      Sets the value of the Argument.
      Parameters:
        `newValue` - the new value

    - #### getValue

          public String getValue()

      Gets the value of the Argument object.
      Returns:
        the attribute's value

    - #### setDescription

          public void setDescription(String description)

      Sets the Description attribute of the Argument.
      Parameters:
        `description` - the new description

    - #### getDescription

          public String getDescription()

      Gets the Meta Data attribute of the Argument.
      Returns:
        the MetaData value

    - #### setMetaData

          public void setMetaData(String newMetaData)

      Sets the Meta Data attribute of the Argument.
      Parameters:
        `newMetaData` - the new metadata

    - #### getMetaData

          public String getMetaData()

      Gets the Meta Data attribute of the Argument.
      Returns:
        the MetaData value

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### isSkippable

          public boolean isSkippable(String parameterName)

      Is this parameter skippable, i.e. empty/blank string or it looks like an unrecognised variable.
      Parameters:
        `parameterName` - - parameter name
      Returns:
        true if parameter should be skipped

Copyright © 1998-2020 Apache Software Foundation. All Rights Reserved.