Status: New
Owner: ----

New issue 733 by rich...@winograd.ca: Marker annotations to enhance performance of InjectionPoint#getInjectionPoints() method
http://code.google.com/p/google-guice/issues/detail?id=733

I'd like a way to mark certain classes as not needing injection (or at least not needing Field injection or Member injection) to save some time in the InjectionPoint#getInjectionPoints() method.

I would like to be able to annotate a class as follows:

@NoFieldInjection(lookInParents=false);
@NoMethodInjection(lookInParents=false);
class DoesntNeedInjection {

   @Inject
   public DoesntNeedInjection(SomeDependency dependency) {
   }
}

@NoFieldInjection(lookInParents = true);
@NoMethodInjection(lookInParents = true);
class DoesntNeedInjection2 extends SomeParentClass {
  //uses default constructor, and JIT binding
  //this class has no fields/methods but the parent class does
}

-------

My reasoning is that for systems (i.e. RoboGuice) injection start up time takes a non trivial amount of time and is done in the UI thread (separate issue, I know, but I'd like to get better performance anyways).

With these marker attributes, we could save crawling the entire inheritance tree, which could be large if you are using some type of 3rd party library.

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To post to this group, send email to google-guice-dev@googlegroups.com.
To unsubscribe from this group, send email to 
google-guice-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-guice-dev?hl=en.

Reply via email to