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

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -