java - Dynamic Proxy - Class Loader parameter when creating a new proxy instance -


i wondering when call newproxyinstance method when creating dynamic proxy instance, classloader argument for?

public static object newproxyinstance(classloader loader, class<?>[] interfaces, invocationhandler h) throws illegalargumentexception 

many thanks!

p.s. i'm not sure how use code formatting tags correctly.

the documentation newproxyinstance defines use equivalent to:

proxy.getproxyclass(loader, interfaces).     getconstructor(new class[] { invocationhandler.class }).     newinstance(new object[] { handler }); 

so, if want bit more detail loader, can @ documentation getproxyclass. basically, serves class loader defines generated proxy class.


Comments

Popular posts from this blog

jQuery clickable div with working mailto link inside -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -