Objects are created by a creator of a proxy. private static boolean isSupportedCreator(Object creator) { return creator instanceof JustInTimeObjectCreator || creator instanceof ReloadableServiceImplementationObjectCreator; }
The creator is accessible by reading a private field of the proxy. First creator is JustInTimeObjectCreator which creates the object (stored in its object field) and in case of a page, service, component and alike you have a proxy again for a reloadable service / page / component(not sure on the later two, used it only for services). And within this proxy creator again used to create the real object but the creators field holding that object is in the field instance. The method of the creator being called to create the actual object (or the second proxy) is createObject with no arguments so you can even instanciate services yourself. Also you can check whether a service is realized (instanciated) you can just check its object/instance field. So summary having a proxy: proxy->creator.createObject():Object proxy->creator.object/instance Create object also returns the object if it was created or is already present. You only have to check if the object you get is just another proxy (having a field creator itself). Cheers, Martin (Kersten), Germany 2013/10/16 Thiago H de Paula Figueiredo <thiag...@gmail.com> > On Wed, 16 Oct 2013 12:09:52 -0300, Alessio Gambi <agamb...@gmail.com> > wrote: > > While ago I tried to patch directly RegistryImpl to get access to modules >> information and various contributions inside the modules. Unfortunately I >> did not managed to extract the actual contributions... My plan was to >> capture the moment when an object is instantiated by the registry and copy >> the data somewhere else to be displayed. >> > > There's a JIRA for it and I have a plan to work on it in the > not-so-distant future. > > > -- > Thiago H. de Paula Figueiredo > Tapestry, Java and Hibernate consultant and developer > http://machina.com.br > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > users-unsubscribe@tapestry.**apache.org<users-unsubscr...@tapestry.apache.org> > For additional commands, e-mail: users-h...@tapestry.apache.org > >