org.apache.wicket.injection
Class ConfigurableInjector

java.lang.Object
  extended by org.apache.wicket.injection.Injector
      extended by org.apache.wicket.injection.ConfigurableInjector
Direct Known Subclasses:
AnnotSpringInjector, GuiceComponentInjector

public abstract class ConfigurableInjector
extends Injector

Abstract injector that allows subclasses to provide IFieldValueFactory pragmatically by implementing getFieldValueFactory(). Allows for injectors that can be used with inject(Object obj) call instead of inject(Object obj, IFieldValueFactory factory), thereby allowing for default factories.

Author:
Igor Vaynberg (ivaynberg)

Constructor Summary
ConfigurableInjector()
           
 
Method Summary
protected abstract  IFieldValueFactory getFieldValueFactory()
          Return the field value factory that will be used to inject objects
 Object inject(Object object)
          Injects proxies using IFieldValueFactory obtained by calling getFieldValueFactory() method
 
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

ConfigurableInjector

public ConfigurableInjector()
Method Detail

inject

public Object inject(Object object)
Injects proxies using IFieldValueFactory obtained by calling getFieldValueFactory() method

Parameters:
object - object to be injected
Returns:
Object that was injected - used for chainig

getFieldValueFactory

protected abstract IFieldValueFactory getFieldValueFactory()
Return the field value factory that will be used to inject objects

Returns:
field value locator factory that will be used to inject objects


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