Class Argument

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

    
    public class Argument
    extends AbstractTestElement implements Serializable
                        

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

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor 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.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      ArgumentSchema getSchema()
      PropertiesAccessor<out Argument, out ArgumentSchema> getProps() Allows type-safe accessors to the properties of the current element.
      void setName(String newName) Set the name of the Argument.
      String getName() Get the name of the Argument.
      void setValue(String newValue) Sets the value of the Argument.
      String getValue() Gets the value of the Argument object.
      void setDescription(String description) Sets the Description attribute of the Argument.
      String getDescription() Gets the Meta Data attribute of the Argument.
      void setMetaData(String newMetaData) Sets the Meta Data attribute of the Argument.
      String getMetaData() Gets the Meta Data attribute of the Argument.
      String toString()
      boolean isSkippable(String parameterName) Is this parameter skippable, i.e.
      • Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement

        addTestElement, canRemove, clear, clearTestElementChildren, clone, equals, getComment, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
      • 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, 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

      • Argument

        Argument()
        Create a new Argument without a name, value, or metadata.
      • Argument

        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

        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

        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

      • getProps

         PropertiesAccessor<out Argument, out ArgumentSchema> 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 ... }

      • setName

         void setName(String newName)

        Set the name of the Argument.

        Parameters:
        newName - the new name
      • getName

         String getName()

        Get the name of the Argument.

        Returns:

        the attribute's name

      • setValue

         void setValue(String newValue)

        Sets the value of the Argument.

        Parameters:
        newValue - the new value
      • getValue

         String getValue()

        Gets the value of the Argument object.

        Returns:

        the attribute's value

      • setDescription

         void setDescription(String description)

        Sets the Description attribute of the Argument.

        Parameters:
        description - the new description
      • getDescription

         String getDescription()

        Gets the Meta Data attribute of the Argument.

        Returns:

        the MetaData value

      • setMetaData

         void setMetaData(String newMetaData)

        Sets the Meta Data attribute of the Argument.

        Parameters:
        newMetaData - the new metadata
      • getMetaData

         String getMetaData()

        Gets the Meta Data attribute of the Argument.

        Returns:

        the MetaData value

      • isSkippable

         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