public class ObjectParam extends NamedTypedValue<ObjectType,List<NamedTypedValue>>
| Modifier and Type | Field and Description |
|---|---|
static String |
PROTO3_BUILDER_METHOD |
static String |
PROTO3_OBJECT_BUILD_METHOD |
accessibleSchema, mapperAllowUnkownFields, objectMaper| Constructor and Description |
|---|
ObjectParam(String name,
ObjectType type,
AccessibleSchema accessibleSchema) |
| Modifier and Type | Method and Description |
|---|---|
ObjectParam |
copyStructure() |
ParamDto |
getDto()
get its dto format in order to further handle it with evomastr core
|
String |
getValueAsJavaString(boolean isJava) |
List<String> |
newAssertionWithJavaOrKotlin(int indent,
String responseVarName,
int maxAssertionForDataInCollection,
boolean isJava)
create assertions with java for response
|
Object |
newInstance() |
List<String> |
newInstanceWithJavaOrKotlin(boolean isDeclaration,
boolean doesIncludeName,
String variableName,
int indent,
boolean isJava,
boolean isVariableNullable)
create instances with Java
|
List<String> |
referenceTypes() |
void |
setValueBasedOnDto(ParamDto dto)
set value based on dto
the value is basically obtained from evomaster core
|
void |
setValueBasedOnInstanceOrJson(Object json)
set value based on json
|
protected void |
setValueBasedOnValidInstance(Object instance)
set the value of the param based on instance
compared with [setValueBasedOnInstance], the type of the instance here is evaluated as valid
|
copyProperties, copyStructureWithProperties, getCandidateReferences, getCandidates, getDefaultValue, getName, getType, getValue, isHasDependentCandidates, isMutable, isNullable, isValidInstance, newAssertionWithJavaOrKotlin, newInstanceWithJavaOrKotlin, parseValueWithJson, sameParam, setCandidateReferences, setCandidates, setDefaultValue, setHasDependentCandidates, setMutable, setNullable, setValue, setValueBasedOnInstancepublic static final String PROTO3_BUILDER_METHOD
public static final String PROTO3_OBJECT_BUILD_METHOD
public ObjectParam(String name, ObjectType type, AccessibleSchema accessibleSchema)
public Object newInstance() throws ClassNotFoundException
newInstance in class NamedTypedValue<ObjectType,List<NamedTypedValue>>ClassNotFoundExceptionpublic ObjectParam copyStructure()
copyStructure in class NamedTypedValue<ObjectType,List<NamedTypedValue>>public ParamDto getDto()
NamedTypedValuegetDto in class NamedTypedValue<ObjectType,List<NamedTypedValue>>public void setValueBasedOnDto(ParamDto dto)
NamedTypedValuesetValueBasedOnDto in class NamedTypedValue<ObjectType,List<NamedTypedValue>>dto - contains value info with stringprotected void setValueBasedOnValidInstance(Object instance)
NamedTypedValuesetValueBasedOnValidInstance in class NamedTypedValue<ObjectType,List<NamedTypedValue>>instance - is the instancepublic void setValueBasedOnInstanceOrJson(Object json) throws com.fasterxml.jackson.core.JsonProcessingException
NamedTypedValuesetValueBasedOnInstanceOrJson in class NamedTypedValue<ObjectType,List<NamedTypedValue>>json - contains value info with json formatcom.fasterxml.jackson.core.JsonProcessingExceptionpublic List<String> newInstanceWithJavaOrKotlin(boolean isDeclaration, boolean doesIncludeName, String variableName, int indent, boolean isJava, boolean isVariableNullable)
NamedTypedValuenewInstanceWithJavaOrKotlin in class NamedTypedValue<ObjectType,List<NamedTypedValue>>isDeclaration - specifies whether it is used to declare the instance (ie, with type name).doesIncludeName - specifies whether it is required to have the variable name
eg, if true, var = new instance(); if yes, new instance();variableName - specifies the name of variableindent - specifies the indent of this block of the codepublic List<String> newAssertionWithJavaOrKotlin(int indent, String responseVarName, int maxAssertionForDataInCollection, boolean isJava)
NamedTypedValuenewAssertionWithJavaOrKotlin in class NamedTypedValue<ObjectType,List<NamedTypedValue>>indent - specifies the current indent of the coderesponseVarName - a variable name for responsespublic String getValueAsJavaString(boolean isJava)
getValueAsJavaString in class NamedTypedValue<ObjectType,List<NamedTypedValue>>public List<String> referenceTypes()
referenceTypes in class NamedTypedValue<ObjectType,List<NamedTypedValue>>Copyright © 2016–2025. All rights reserved.