public abstract class PrimitiveOrWrapperParam<V> extends NamedTypedValue<PrimitiveOrWrapperType,V> implements NumericConstraintBase<Long>
accessibleSchema, NOT_NULL_MARK_OBJ_DATE| Constructor and Description |
|---|
PrimitiveOrWrapperParam(String name,
PrimitiveOrWrapperType type,
AccessibleSchema accessibleSchema) |
PrimitiveOrWrapperParam(String name,
String type,
String fullTypeName,
Class<?> clazz,
AccessibleSchema accessibleSchema) |
| Modifier and Type | Method and Description |
|---|---|
static PrimitiveOrWrapperParam |
build(String name,
Class<?> clazz,
AccessibleSchema accessibleSchema) |
Object |
convertValueTo(Object value) |
void |
copyProperties(NamedTypedValue copy) |
String |
getCastType() |
ParamDto |
getDto()
get its dto format in order to further handle it with evomastr core
|
Long |
getMax() |
boolean |
getMaxInclusive() |
Long |
getMin() |
boolean |
getMinInclusive() |
Integer |
getPrecision() |
static Type |
getPrimitiveOrWrapper(Type type)
setter might not use exact same type for primitive type
|
abstract String |
getPrimitiveValue(String responseVarName) |
Integer |
getScale() |
List<String> |
newAssertionWithJava(int indent,
String responseVarName,
int maxAssertionForDataInCollection)
create assertions with java for response
|
Object |
newInstance() |
List<String> |
newInstanceWithJava(boolean isDeclaration,
boolean doesIncludeName,
String variableName,
int indent)
create instances with Java
|
void |
setMax(Long max) |
void |
setMaxInclusive(boolean inclusive) |
void |
setMin(Long min) |
void |
setMinInclusive(boolean inclusive) |
void |
setPrecision(Integer precision) |
void |
setScale(Integer scale) |
void |
setValueBasedOnDto(ParamDto dto)
set value based on dto
the value is basically obtained from evomaster core
|
abstract void |
setValueBasedOnStringValue(String stringValue) |
copyStructure, copyStructureWithProperties, getCandidateReferences, getCandidates, getDefaultValue, getName, getType, getValue, getValueAsJavaString, isHasDependentCandidates, isMutable, isNullable, isValidInstance, newAssertionWithJava, newInstanceWithJava, parseValueWithJson, sameParam, setCandidateReferences, setCandidates, setDefaultValue, setHasDependentCandidates, setMutable, setNullable, setValue, setValueBasedOnInstance, setValueBasedOnInstanceOrJson, setValueBasedOnValidInstanceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleConstraintsInCopy, handleConstraintsInCopyDtopublic PrimitiveOrWrapperParam(String name, String type, String fullTypeName, Class<?> clazz, AccessibleSchema accessibleSchema)
public PrimitiveOrWrapperParam(String name, PrimitiveOrWrapperType type, AccessibleSchema accessibleSchema)
public static PrimitiveOrWrapperParam build(String name, Class<?> clazz, AccessibleSchema accessibleSchema)
public static Type getPrimitiveOrWrapper(Type type)
type - public ParamDto getDto()
NamedTypedValuegetDto in class NamedTypedValue<PrimitiveOrWrapperType,V>public Long getMin()
getMin in interface NumericConstraintBase<Long>public void setMin(Long min)
setMin in interface NumericConstraintBase<Long>public Long getMax()
getMax in interface NumericConstraintBase<Long>public void setMax(Long max)
setMax in interface NumericConstraintBase<Long>public Object newInstance()
newInstance in class NamedTypedValue<PrimitiveOrWrapperType,V>public List<String> newInstanceWithJava(boolean isDeclaration, boolean doesIncludeName, String variableName, int indent)
NamedTypedValuenewInstanceWithJava in class NamedTypedValue<PrimitiveOrWrapperType,V>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> newAssertionWithJava(int indent, String responseVarName, int maxAssertionForDataInCollection)
NamedTypedValuenewAssertionWithJava in class NamedTypedValue<PrimitiveOrWrapperType,V>indent - specifies the current indent of the coderesponseVarName - a variable name for responsespublic void setValueBasedOnDto(ParamDto dto)
NamedTypedValuesetValueBasedOnDto in class NamedTypedValue<PrimitiveOrWrapperType,V>dto - contains value info with stringpublic abstract void setValueBasedOnStringValue(String stringValue)
public abstract String getPrimitiveValue(String responseVarName)
responseVarName - refers to the variable name in responsepublic void copyProperties(NamedTypedValue copy)
copyProperties in class NamedTypedValue<PrimitiveOrWrapperType,V>public String getCastType()
public boolean getMinInclusive()
getMinInclusive in interface NumericConstraintBase<Long>public void setMinInclusive(boolean inclusive)
setMinInclusive in interface NumericConstraintBase<Long>public boolean getMaxInclusive()
getMaxInclusive in interface NumericConstraintBase<Long>public void setMaxInclusive(boolean inclusive)
setMaxInclusive in interface NumericConstraintBase<Long>public Integer getPrecision()
getPrecision in interface NumericConstraintBase<Long>public void setPrecision(Integer precision)
setPrecision in interface NumericConstraintBase<Long>public Integer getScale()
getScale in interface NumericConstraintBase<Long>public void setScale(Integer scale)
setScale in interface NumericConstraintBase<Long>Copyright © 2016–2022. All rights reserved.