Class StringParam
java.lang.Object
org.evomaster.client.java.controller.problem.rpc.schema.params.NamedTypedValue<StringType,String>
org.evomaster.client.java.controller.problem.rpc.schema.params.StringParam
- All Implemented Interfaces:
NumericConstraintBase<BigDecimal>
public class StringParam
extends NamedTypedValue<StringType,String>
implements NumericConstraintBase<BigDecimal>
string param
-
Field Summary
Fields inherited from class org.evomaster.client.java.controller.problem.rpc.schema.params.NamedTypedValue
accessibleSchema, mapperAllowUnkownFields, objectMaper -
Constructor Summary
ConstructorsConstructorDescriptionStringParam(String name, AccessibleSchema accessibleSchema, JavaDtoSpec spec) StringParam(String name, StringType type, AccessibleSchema accessibleSchema) -
Method Summary
Modifier and TypeMethodDescriptionvoidgetDto()get its dto format in order to further handle it with evomastr coregetMax()booleangetMin()booleangetScale()getValueAsJavaString(boolean isJava) 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 JavavoidsetMax(BigDecimal max) voidsetMaxInclusive(boolean inclusive) voidsetMaxSize(Integer maxSize) voidsetMin(BigDecimal min) voidsetMinInclusive(boolean inclusive) voidsetMinSize(Integer minSize) voidsetPattern(String pattern) voidsetPrecision(Integer precision) voidvoidset 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
copyStructureWithProperties, getCandidateReferences, getCandidates, getDefaultValue, getName, getType, getValue, isHasDependentCandidates, isMutable, isNullable, isValidInstance, newAssertionWithJavaOrKotlin, newInstanceWithJavaOrKotlin, parseValueWithJson, sameParam, setCandidateReferences, setCandidates, setDefaultValue, setHasDependentCandidates, setMutable, setNullable, setValue, setValueBasedOnInstanceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.evomaster.client.java.controller.problem.rpc.schema.params.NumericConstraintBase
handleConstraintsInCopy, handleConstraintsInCopyDto
-
Constructor Details
-
StringParam
-
StringParam
-
-
Method Details
-
getMinSize
-
setMinSize
-
getMaxSize
-
setMaxSize
-
getMin
- Specified by:
getMinin interfaceNumericConstraintBase<BigDecimal>
-
setMin
- Specified by:
setMinin interfaceNumericConstraintBase<BigDecimal>
-
getMax
- Specified by:
getMaxin interfaceNumericConstraintBase<BigDecimal>
-
setMax
- Specified by:
setMaxin interfaceNumericConstraintBase<BigDecimal>
-
getPattern
-
setPattern
-
newInstance
- Specified by:
newInstancein classNamedTypedValue<StringType,String>
-
referenceTypes
- Specified by:
referenceTypesin classNamedTypedValue<StringType,String>
-
copyStructure
- Specified by:
copyStructurein classNamedTypedValue<StringType,String>
-
setValueBasedOnDto
Description copied from class:NamedTypedValueset value based on dto the value is basically obtained from evomaster core- Specified by:
setValueBasedOnDtoin classNamedTypedValue<StringType,String> - Parameters:
dto- contains value info with string
-
setValueBasedOnInstanceOrJson
public void setValueBasedOnInstanceOrJson(Object json) throws com.fasterxml.jackson.core.JsonProcessingException Description copied from class:NamedTypedValueset value based on json- Overrides:
setValueBasedOnInstanceOrJsonin classNamedTypedValue<StringType,String> - Parameters:
json- contains value info with json format- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
getDto
Description copied from class:NamedTypedValueget its dto format in order to further handle it with evomastr core- Overrides:
getDtoin classNamedTypedValue<StringType,String> - Returns:
- its corresponding dto
-
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<StringType,String> - Parameters:
instance- is the instance
-
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<StringType,String> - 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<StringType,String> - 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<StringType,String> - Returns:
- a string which could representing the value of the param with java eg, float 4.2 could be 4.2f
-
copyProperties
- Overrides:
copyPropertiesin classNamedTypedValue<StringType,String>
-
getMinInclusive
public boolean getMinInclusive()- Specified by:
getMinInclusivein interfaceNumericConstraintBase<BigDecimal>
-
setMinInclusive
public void setMinInclusive(boolean inclusive) - Specified by:
setMinInclusivein interfaceNumericConstraintBase<BigDecimal>
-
getMaxInclusive
public boolean getMaxInclusive()- Specified by:
getMaxInclusivein interfaceNumericConstraintBase<BigDecimal>
-
setMaxInclusive
public void setMaxInclusive(boolean inclusive) - Specified by:
setMaxInclusivein interfaceNumericConstraintBase<BigDecimal>
-
getPrecision
- Specified by:
getPrecisionin interfaceNumericConstraintBase<BigDecimal>
-
setPrecision
- Specified by:
setPrecisionin interfaceNumericConstraintBase<BigDecimal>
-
getScale
- Specified by:
getScalein interfaceNumericConstraintBase<BigDecimal>
-
setScale
- Specified by:
setScalein interfaceNumericConstraintBase<BigDecimal>
-