package org.onap.sdc.dcae.catalog.commons; import java.util.Map; import java.lang.reflect.ParameterizedType; import org.json.JSONObject; import org.onap.sdc.dcae.catalog.commons.ProxyBuilder; public class Proxies { private Proxies() { } private static ProxyBuilder builder = new ProxyBuilder(); public static T build(Map theData, Class theType) { return builder.build(new JSONObject(theData), theType); } public static T build(Map theData, Map theContextData, Class theType) { return builder.build(new JSONObject(theData), theContextData, theType); } public static T build(JSONObject theData, Class theType) { return builder.build(theData, theType); } public static Class typeArgument(Class theType) { return (Class) ((ParameterizedType)theType.getGenericSuperclass()). getActualTypeArguments()[0]; } }