org.apache.wicket.guice
Class InjectionFlagCachingGuiceComponentInjector

java.lang.Object
  extended by org.apache.wicket.injection.Injector
      extended by org.apache.wicket.injection.ConfigurableInjector
          extended by org.apache.wicket.guice.GuiceComponentInjector
              extended by org.apache.wicket.guice.InjectionFlagCachingGuiceComponentInjector
All Implemented Interfaces:
IComponentInstantiationListener

public class InjectionFlagCachingGuiceComponentInjector
extends GuiceComponentInjector

Finding the guice annotations via reflection for each Component instantiation is a rather heavyweight operation (@link GuiceComponentInjector. This causes considerable overhead with large lists that have complicated component structure per row, which is totally unnecessary for stock wicket components that do not contain any Guice annotations.

Author:
Teppo Kurki (Wicket-1763)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.wicket.guice.GuiceComponentInjector
GuiceComponentInjector.MoreThanOneBindingException
 
Constructor Summary
InjectionFlagCachingGuiceComponentInjector(Application app, com.google.inject.Injector injector)
          Construct.
 
Method Summary
 Object inject(Object object)
           
 void onInstantiation(Component component)
           
 
Methods inherited from class org.apache.wicket.guice.GuiceComponentInjector
findBindingAnnotation, getFieldValueFactory
 
Methods inherited from class org.apache.wicket.injection.Injector
getInstance, inject, isBoundaryClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InjectionFlagCachingGuiceComponentInjector

public InjectionFlagCachingGuiceComponentInjector(Application app,
                                                  com.google.inject.Injector injector)
Construct.

Parameters:
app -
injector -
Method Detail

inject

public Object inject(Object object)
Overrides:
inject in class GuiceComponentInjector
Parameters:
object - object to be injected
Returns:
Object that was injected - used for chaining
See Also:
GuiceComponentInjector.inject(java.lang.Object)

onInstantiation

public void onInstantiation(Component component)
Specified by:
onInstantiation in interface IComponentInstantiationListener
Overrides:
onInstantiation in class GuiceComponentInjector
See Also:
GuiceComponentInjector.onInstantiation(org.apache.wicket.Component)


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.