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

net.sf.json.DelegatingValueVisitor Maven / Gradle / Ivy

Go to download

Java library for transforming beans, maps, collections, java arrays and XML to JSON.

There is a newer version: 2.1-rev6
Show newest version
package net.sf.json;

/**
 * @author Kohsuke Kawaguchi
 */
public abstract class DelegatingValueVisitor extends ValueVisitor {
    protected abstract V accept(Object o);
    protected V accept(JSON json) {
        return accept((Object)json);
    }

    public V accept(JSONFunction f) {
        return accept((Object)f);
    }

    public V accept(JSONString s) {
        return accept((Object)s);
    }

    public V accept(Number n) {
        return accept((Object)n);
    }

    public V accept(Boolean b) {
        return accept((Object)b);
    }

    public V accept(JSONObject o) {
        return accept((JSON)o);
    }

    public V accept(JSONArray a) {
        return accept((JSON)a);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy