Class PairParam
java.lang.Object
org.evomaster.client.java.controller.problem.rpc.schema.params.NamedTypedValue<PairType,AbstractMap.SimpleEntry<NamedTypedValue,NamedTypedValue>>
org.evomaster.client.java.controller.problem.rpc.schema.params.PairParam
public class PairParam
extends NamedTypedValue<PairType,AbstractMap.SimpleEntry<NamedTypedValue,NamedTypedValue>>
map entry which is only used for handling map
-
Field Summary
FieldsFields inherited from class org.evomaster.client.java.controller.problem.rpc.schema.params.NamedTypedValue
accessibleSchema, mapperAllowUnkownFields, objectMaper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDto()get its dto format in order to further handle it with evomastr coregetValueAsJavaString(boolean isJava) booleanisValidInstance(Object instance) newAssertionWithJavaOrKotlin(int indent, String responseVarName, int maxAssertionForDataInCollection, boolean isJava) create assertions with java for responsenewInstanceWithJavaOrKotlin(boolean isDeclaration, boolean doesIncludeName, String variableName, int indent, boolean isJava, boolean isVariableNullable) create instances with Javavoidset value based on dto the value is basically obtained from evomaster corevoidset value based on jsonprotected voidsetValueBasedOnValidInstance(Object instance) set the value of the param based on instance compared with [setValueBasedOnInstance], the type of the instance here is evaluated as validMethods inherited from class org.evomaster.client.java.controller.problem.rpc.schema.params.NamedTypedValue
copyProperties, copyStructureWithProperties, getCandidateReferences, getCandidates, getDefaultValue, getName, getType, getValue, isHasDependentCandidates, isMutable, isNullable, newAssertionWithJavaOrKotlin, newInstanceWithJavaOrKotlin, parseValueWithJson, sameParam, setCandidateReferences, setCandidates, setDefaultValue, setHasDependentCandidates, setMutable, setNullable, setValue, setValueBasedOnInstance
-
Field Details
-
PAIR_NAME
- See Also:
-
-
Constructor Details
-
PairParam
-
-
Method Details
-
newInstance
- Specified by:
newInstancein classNamedTypedValue<PairType,AbstractMap.SimpleEntry<NamedTypedValue, NamedTypedValue>> - Throws:
ClassNotFoundException
-
getDto
Description copied from class:NamedTypedValueget its dto format in order to further handle it with evomastr core- Overrides:
getDtoin classNamedTypedValue<PairType,AbstractMap.SimpleEntry<NamedTypedValue, NamedTypedValue>> - Returns:
- its corresponding dto
-
copyStructure
- Specified by:
copyStructurein classNamedTypedValue<PairType,AbstractMap.SimpleEntry<NamedTypedValue, NamedTypedValue>>
-
setValueBasedOnDto
Description copied from class:NamedTypedValueset value based on dto the value is basically obtained from evomaster core- Specified by:
setValueBasedOnDtoin classNamedTypedValue<PairType,AbstractMap.SimpleEntry<NamedTypedValue, NamedTypedValue>> - Parameters:
dto- contains value info with string
-
setValueBasedOnValidInstance
Description copied from class:NamedTypedValueset the value of the param based on instance compared with [setValueBasedOnInstance], the type of the instance here is evaluated as valid- Specified by:
setValueBasedOnValidInstancein classNamedTypedValue<PairType,AbstractMap.SimpleEntry<NamedTypedValue, NamedTypedValue>> - Parameters:
instance- is the instance
-
setValueBasedOnInstanceOrJson
public void setValueBasedOnInstanceOrJson(Object json) throws com.fasterxml.jackson.core.JsonProcessingException Description copied from class:NamedTypedValueset value based on json- Overrides:
setValueBasedOnInstanceOrJsonin classNamedTypedValue<PairType,AbstractMap.SimpleEntry<NamedTypedValue, NamedTypedValue>> - Parameters:
json- contains value info with json format- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
isValidInstance
- Overrides:
isValidInstancein classNamedTypedValue<PairType,AbstractMap.SimpleEntry<NamedTypedValue, NamedTypedValue>> - Parameters:
instance- a java object which is an instance of this param schema- Returns:
- if the specified instance conforms with this param schema
-
newInstanceWithJavaOrKotlin
public List<String> newInstanceWithJavaOrKotlin(boolean isDeclaration, boolean doesIncludeName, String variableName, int indent, boolean isJava, boolean isVariableNullable) Description copied from class:NamedTypedValuecreate instances with Java- Specified by:
newInstanceWithJavaOrKotlinin classNamedTypedValue<PairType,AbstractMap.SimpleEntry<NamedTypedValue, NamedTypedValue>> - Parameters:
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 code- Returns:
- a list of string which could create instance with java
-
newAssertionWithJavaOrKotlin
public List<String> newAssertionWithJavaOrKotlin(int indent, String responseVarName, int maxAssertionForDataInCollection, boolean isJava) Description copied from class:NamedTypedValuecreate assertions with java for response- Specified by:
newAssertionWithJavaOrKotlinin classNamedTypedValue<PairType,AbstractMap.SimpleEntry<NamedTypedValue, NamedTypedValue>> - Parameters:
indent- specifies the current indent of the coderesponseVarName- a variable name for responses- Returns:
- a list of string for assertions
-
getValueAsJavaString
- Specified by:
getValueAsJavaStringin classNamedTypedValue<PairType,AbstractMap.SimpleEntry<NamedTypedValue, NamedTypedValue>> - Returns:
- a string which could representing the value of the param with java eg, float 4.2 could be 4.2f
-
referenceTypes
- Specified by:
referenceTypesin classNamedTypedValue<PairType,AbstractMap.SimpleEntry<NamedTypedValue, NamedTypedValue>>
-