T - The type of the children DSl test elements.public class ChildrenParam<T> extends MethodParam
This is usually used in TestElementContainer instances which usually provide a builder method with basic required parameters and children elements (eg: thread groups & controllers).
expression, paramType| Constructor and Description |
|---|
ChildrenParam(Class<T> childrenClass) |
ChildrenParam(Class<T> childrenClass,
List<MethodCall> children) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(MethodCall child) |
String |
buildCode(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.
|
boolean |
isDefault()
Allows checking if a parameter is set to the default value.
|
void |
prependChild(MethodCall child) |
void |
replaceChild(MethodCall original,
MethodCall replacement) |
buildStringLiteral, findConstantNames, findConstantNamesMap, getExpression, getType, isIgnoredpublic ChildrenParam(Class<T> childrenClass, List<MethodCall> children)
public boolean isDefault()
MethodParam
This is usually used in MethodCallBuilder instances 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.
isDefault in class MethodParampublic Set<String> getStaticImports()
MethodParamOverride this method if you implement a custom MethodParam that requires some particular import.
getStaticImports in class MethodParampublic Set<String> getImports()
MethodParamOverride this method if you implement a custom MethodParam that requires some particular static import.
getImports in class MethodParampublic Map<String,MethodCall> getMethodDefinitions()
getMethodDefinitions in class MethodParampublic String buildCode(String indent)
buildCode in class MethodParampublic void addChild(MethodCall child)
public void replaceChild(MethodCall original, MethodCall replacement)
public void prependChild(MethodCall child)
Copyright © 2023. All rights reserved.