
com.almondtools.testrecorder.values.SerializedImmutable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of testrecorder Show documentation
Show all versions of testrecorder Show documentation
Recording test data from running program.
package com.almondtools.testrecorder.values;
import java.lang.reflect.Type;
import com.almondtools.testrecorder.SerializedValue;
import com.almondtools.testrecorder.visitors.SerializedValuePrinter;
public abstract class SerializedImmutable implements SerializedValue {
private Type type;
private Class> valueType;
private T value;
public SerializedImmutable(Type type, Class> valueType) {
this.type = type;
this.valueType = valueType;
}
public SerializedImmutable withValue(T value) {
this.value = value;
return this;
}
public void setValue(T value) {
this.value = value;
}
@Override
public Type getType() {
return type;
}
@Override
public Class> getValueType() {
return valueType;
}
public T getValue() {
return value;
}
@Override
public String toString() {
return accept(new SerializedValuePrinter());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy