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

com.github.dreamhead.moco.parser.model.BaseResourceSetting Maven / Gradle / Ivy

Go to download

Moco is an easy setup stub framework, mainly focusing on testing and integration.

There is a newer version: 1.5.0
Show newest version
package com.github.dreamhead.moco.parser.model;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.MoreObjects;

@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
public abstract class BaseResourceSetting {
    private TextContainer text;
    private FileContainer file;
    @JsonProperty("path_resource")
    private FileContainer pathResource;
    private Object json;

    protected MoreObjects.ToStringHelper toStringHelper() {
        return MoreObjects.toStringHelper(this)
                .omitNullValues()
                .add("text", text)
                .add("file", file)
                .add("path resource", pathResource)
                .add("json", json);
    }

    @Override
    public final String toString() {
        return toStringHelper().toString();
    }

    protected final  T asBaseResourceSetting(final T setting) {
        BaseResourceSetting base = setting;
        base.text = text;
        base.file = file;
        base.pathResource = pathResource;
        base.json = json;
        return setting;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy