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

io.datakernel.codec.registry.CodecFactory Maven / Gradle / Ivy

There is a newer version: 3.1.0
Show newest version
package io.datakernel.codec.registry;

import io.datakernel.codec.StructuredCodec;
import io.datakernel.common.reflection.TypeT;

import java.lang.reflect.Type;

/**
 * This is an interface for something that can create or retrieve a codec for a given type.
 */
public interface CodecFactory {
	default  StructuredCodec get(Class type) {
		return get((Type) type);
	}

	default  StructuredCodec get(TypeT type) {
		return get(type.getType());
	}

	 StructuredCodec get(Type type);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy