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

org.conqat.engine.commons.util.SerializationViews Maven / Gradle / Ivy

The newest version!
package org.conqat.engine.commons.util;

import com.fasterxml.jackson.annotation.JsonView;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * Collection of marker classes that represent views on the serialized JSON.
 *
 * @see JsonView
 */
public class SerializationViews {

	/**
	 * Default JSONView, needed to prevent attributes with other views be serialized.
	 *
	 * @apiNote You should not use this as an actual {@link JsonView}. It is just used as default for
	 *          {@link ObjectMapper#writerWithView(Class)} in order to exclude other views per default.
	 */
	public static class DefaultView {

		/**
		 * Private constructor to prevent instantiation.
		 **/
		private DefaultView() {
		}
	}

	/** JSONView for instance comparison **/
	public static final class InstanceComparisonView extends DefaultView {

		/**
		 * Private constructor to prevent instantiation.
		 **/
		private InstanceComparisonView() {
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy