Class ChildrenParam<T>
- java.lang.Object
-
- us.abstracta.jmeter.javadsl.codegeneration.MethodParam
-
- us.abstracta.jmeter.javadsl.codegeneration.params.ChildrenParam<T>
-
- Type Parameters:
T- The type of the children DSl test elements.
public class ChildrenParam<T> extends MethodParam
Is a parameter used to specify DSL test element children methods.This is usually used in TestElementContainer instances which usually provide a builder method with basic required parameters and children elements (eg: thread groups & controllers).
- Since:
- 0.45
-
-
Field Summary
-
Fields inherited from class us.abstracta.jmeter.javadsl.codegeneration.MethodParam
expression, paramType
-
-
Constructor Summary
Constructors Constructor Description ChildrenParam(Class<T> childrenClass)ChildrenParam(Class<T> childrenClass, List<MethodCall> children)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(MethodCall child)StringbuildCode(String indent)Set<String>getImports()Gets all classes that are required to be statically imported by generated code.Map<String,MethodCall>getMethodDefinitions()Set<String>getStaticImports()Gets all classes that are required to be imported by generated code.booleanisDefault()Allows checking if a parameter is set to the default value.voidprependChild(MethodCall child)voidreplaceChild(MethodCall original, MethodCall replacement)-
Methods inherited from class us.abstracta.jmeter.javadsl.codegeneration.MethodParam
buildStringLiteral, findConstantNames, findConstantNamesMap, getExpression, 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.
-
getStaticImports
public Set<String> getStaticImports()
Description copied from class:MethodParamGets all classes that are required to be imported by generated code.Override this method if you implement a custom MethodParam that requires some particular import.
- Overrides:
getStaticImportsin classMethodParam- Returns:
- the set of required classes names that need to be imported by generated code.
-
getImports
public Set<String> getImports()
Description copied from class:MethodParamGets all classes that are required to be statically imported by generated code.Override this method if you implement a custom MethodParam that requires some particular static import.
- Overrides:
getImportsin classMethodParam- Returns:
- the set of required classes names that need to be statically imported by generated code.
-
getMethodDefinitions
public Map<String,MethodCall> getMethodDefinitions()
- Overrides:
getMethodDefinitionsin classMethodParam
-
buildCode
public String buildCode(String indent)
- Overrides:
buildCodein classMethodParam
-
addChild
public void addChild(MethodCall child)
-
replaceChild
public void replaceChild(MethodCall original, MethodCall replacement)
-
prependChild
public void prependChild(MethodCall child)
-
-