com.astamuse.asta4d.data.ContextDataHolder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of asta4d-core Show documentation
Show all versions of asta4d-core Show documentation
core functionalities of asta4d framework, including template and snippt implemention
package com.astamuse.asta4d.data;
import java.io.Serializable;
public class ContextDataHolder implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private String name;
private String scope;
private Object foundOriginalData;
private T value;
private Class typeCls;
public ContextDataHolder() {
super();
}
public ContextDataHolder(Class typeCls) {
super();
this.typeCls = typeCls;
}
public ContextDataHolder(String name, String scope, T value) {
super();
this.name = name;
this.scope = scope;
this.value = value;
this.foundOriginalData = value;
}
public String getName() {
return name;
}
public String getScope() {
return scope;
}
public Object getFoundOriginalData() {
return foundOriginalData;
}
public T getValue() {
return value;
}
public Class getTypeCls() {
return typeCls;
}
public void setData(String name, String scope, T value) {
setData(name, scope, value, value);
}
public void setData(String name, String scope, Object foundValue, T transformedValue) {
this.name = name;
this.scope = scope;
this.value = transformedValue;
this.foundOriginalData = foundValue;
}
}