org.xwiki.component.embed
Class GenericProvider

java.lang.Object
  extended by org.xwiki.component.embed.GenericProvider
All Implemented Interfaces:
javax.inject.Provider<Object>

public class GenericProvider
extends Object
implements javax.inject.Provider<Object>

Default provider used when the Component Manager needs to inject a Provider field but no custom Provider has been registered. The default behavior is simply to look up the Component role class when Provider.get() is called. This is useful for example when you wish to do "lazy injection".

Since:
3.3M2
Version:
$Id: 141a61314b4c3344b010a8e57b0ea90edcf1d360 $

Constructor Summary
GenericProvider(ComponentManager componentManager, org.xwiki.component.internal.RoleHint roleHint)
           
 
Method Summary
 Object get()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericProvider

public GenericProvider(ComponentManager componentManager,
                       org.xwiki.component.internal.RoleHint roleHint)
Parameters:
componentManager - the Component Manager instance that we'll use to look up the Component Role during Provider.get()
roleHint - the Component Role and Hint that uniquely identify the Component we wish to provide for
Method Detail

get

public Object get()
Specified by:
get in interface javax.inject.Provider<Object>


Copyright © 2004-2011 XWiki. All Rights Reserved.