java - Why the constructor function didn't executed? -
why constructor function registerproxy() didn't executed when called " r response = proxy.callapisync(request);" ?
public class soacaller { private static registerproxy proxy = new registerproxy(); ; public static <t, r> r callapisyn(t request){ r response = proxy.callapisync(request); return response; } } public class registerproxy { private static hashmap<string, basesoaimplement> cache = new hashmap<>(); public registerproxy(){ try { cache.put(gethotelstaticinforequesttype.class.getname(), new gethotelstaticinfoimpl()); } catch (exception ex){ exceptionutils.getstacktrace(ex)); } }
new registerproxy();
only ran first time classloader encounters class soacaller
.
that far earlier calling of callapisyn
Comments
Post a Comment