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

com.abubusoft.kripton.BinderUtils Maven / Gradle / Ivy

There is a newer version: 8.2.0-rc.4
Show newest version
package com.abubusoft.kripton;

import java.lang.reflect.ParameterizedType;

import com.abubusoft.kripton.exception.NoSuchMapperException;

public abstract class BinderUtils {

	/**
	 * 

* This method will be used by bean mapper to persists embedded objects. *

* * @param cls * The class for which the JsonMapper should be fetched. */ public static > M mapperFor(Class cls) throws NoSuchMapperException { return AbstractJacksonContext.mapperFor(cls); } /** *

* This method will be used by bean mapper to persists embedded objects. *

* * @param type * @return * @throws NoSuchMapperException */ public static > M mapperFor(ParameterizedType type) throws NoSuchMapperException { @SuppressWarnings("unchecked") M mapper = AbstractContext.getMapper((Class) type.getActualTypeArguments()[0]); if (mapper == null) { throw new NoSuchMapperException(type.getRawType()); } else { return mapper; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy