All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.gsonfire.ClassConfig Maven / Gradle / Ivy

Go to download

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!

There is a newer version: 1.9.0
Show newest version
package io.gsonfire;

import java.util.ArrayList;
import java.util.Collection;

/**
 * @autor: julio
 */
public final class ClassConfig {

    private Class clazz;
    private TypeSelector typeSelector;
    private Collection> preProcessors;
    private Collection> postProcessors;
    private boolean hooksEnabled;

    public ClassConfig(Class clazz) {
        this.clazz = clazz;
    }

    public Class getConfiguredClass(){
        return clazz;
    }

    public TypeSelector getTypeSelector() {
        return typeSelector;
    }

    public void setTypeSelector(TypeSelector 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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy