Java tutorial
package de.alexkamp.sandbox.model; /** * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import com.fasterxml.jackson.core.JsonGenerator; import java.io.IOException; /** * Created by akampmann on 3/16/15. */ public enum SpecialMount implements Mount { SYS("sys", "/sys"), PROC("proc", "/proc"); private final String type; private final String mountPath; private SpecialMount(String type, String mountPath) { this.type = type; this.mountPath = mountPath; } @Override public String getMountPoint() { return mountPath; } @Override public void toJSON(JsonGenerator gen) throws IOException { gen.writeStartObject(); gen.writeObjectField("type", type); gen.writeEndObject(); } }