io.gsonfire.ClassConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gson-fire Show documentation
Show all versions of gson-fire Show documentation
A java library that adds some very useful features to Gson, like Date serializing to unix timestamp or RFC3339, method (getter) serialization, pre and post processors and many more. Check out the documentation to learn how to use it!
package io.gsonfire;
import java.util.ArrayList;
import java.util.Collection;
/**
* @autor: julio
*/
public final class ClassConfig {
private Class clazz;
private TypeSelector super T> typeSelector;
private Collection> preProcessors;
private Collection> postProcessors;
private boolean hooksEnabled;
public ClassConfig(Class clazz) {
this.clazz = clazz;
}
public Class getConfiguredClass(){
return clazz;
}
public TypeSelector super T> getTypeSelector() {
return typeSelector;
}
public void setTypeSelector(TypeSelector super T> typeSelector) {
this.typeSelector = typeSelector;
}
public Collection> getPostProcessors() {
if(postProcessors == null){
postProcessors = new ArrayList>();
}
return postProcessors;
}
public Collection> getPreProcessors() {
if(preProcessors == null){
preProcessors = new ArrayList>();
}
return preProcessors;
}
public boolean isHooksEnabled() {
return hooksEnabled;
}
public void setHooksEnabled(boolean hooksEnabled) {
this.hooksEnabled = hooksEnabled;
}
}