1 package org.onap.sdc.dcae.catalog.commons;
4 import java.lang.reflect.ParameterizedType;
6 import org.json.JSONObject;
8 import org.onap.sdc.dcae.catalog.commons.ProxyBuilder;
11 public class Proxies {
17 private static ProxyBuilder builder = new ProxyBuilder();
19 public static <T> T build(Map theData, Class<T> theType) {
20 return builder.build(new JSONObject(theData), theType);
23 public static <T> T build(Map theData, Map theContextData, Class<T> theType) {
24 return builder.build(new JSONObject(theData), theContextData, theType);
27 public static <T> T build(JSONObject theData, Class<T> theType) {
28 return builder.build(theData, theType);
31 public static <T> Class<T> typeArgument(Class theType) {
33 ((ParameterizedType)theType.getGenericSuperclass()).
34 getActualTypeArguments()[0];