Class FixedParam<T>
- java.lang.Object
-
- us.abstracta.jmeter.javadsl.codegeneration.MethodParam
-
- us.abstracta.jmeter.javadsl.codegeneration.params.FixedParam<T>
-
- Type Parameters:
T- The type of the parameter value.
- Direct Known Subclasses:
BoolParam,ContentTypeParam,DoubleParam,DslJsonExtractor.CodeBuilder.JsonPathQueryLanguageParam,DurationParam,EncodingParam,EnumParam,FloatParam,IntParam,LongParam,StringArrayParam,StringParam
public abstract class FixedParam<T> extends MethodParam
Is a parameter with a fixed value.- Since:
- 0.57
-
-
Field Summary
Fields Modifier and Type Field Description protected TdefaultValueprotected Tvalue-
Fields inherited from class us.abstracta.jmeter.javadsl.codegeneration.MethodParam
expression, paramType
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringbuildCode(String indent)TgetValue()Gets the value associated to the parameter.booleanisDefault()Allows checking if a parameter is set to the default value.-
Methods inherited from class us.abstracta.jmeter.javadsl.codegeneration.MethodParam
buildStringLiteral, findConstantNames, findConstantNamesMap, getExpression, getImports, getMethodDefinitions, getStaticImports, getType, isIgnored
-
-
-
-
Method Detail
-
isDefault
public boolean isDefault()
Description copied from class:MethodParamAllows checking if a parameter is set to the default value.This is usually used in
MethodCallBuilderinstances to check if a parameter is set or not to some custom value, and some method chaingin is required or not.This method may, and is, overwritten by subclasses depending on the semantics of each type of parameter.
- Overrides:
isDefaultin classMethodParam- Returns:
- true when the value is the default one or not specified (null), false otherwise.
-
getValue
public T getValue()
Gets the value associated to the parameter.- Returns:
- the value.
-
buildCode
public String buildCode(String indent)
- Overrides:
buildCodein classMethodParam
-
-