org.xwiki.component.annotation
Class DefaultComponentDependencyFactory

java.lang.Object
  extended by org.xwiki.component.annotation.AbstractComponentDependencyFactory
      extended by org.xwiki.component.annotation.DefaultComponentDependencyFactory
All Implemented Interfaces:
ComponentDependencyFactory

public class DefaultComponentDependencyFactory
extends AbstractComponentDependencyFactory

Uses Inject and Named annotations to recognize a Component Dependency.

Since:
3.2RC1
Version:
$Id: 123b1b74722f703e950a5bac47dc53e6ba6702b9 $

Constructor Summary
DefaultComponentDependencyFactory()
           
 
Method Summary
 ComponentDependency createComponentDependency(Field field)
           
protected  Class<?> getFieldRole(Field field)
          Extract component role from the field to inject.
 
Methods inherited from class org.xwiki.component.annotation.AbstractComponentDependencyFactory
getGenericRole, isDependencyOfListType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultComponentDependencyFactory

public DefaultComponentDependencyFactory()
Method Detail

createComponentDependency

public ComponentDependency createComponentDependency(Field field)
Parameters:
field - the field for which to extract a Component Dependency
Returns:
the Component Dependency instance created from the passed field or null if the field doesn't match the requirements

getFieldRole

protected Class<?> getFieldRole(Field field)
Extract component role from the field to inject.

Parameters:
field - the field to inject
Returns:
the role of the field to inject


Copyright © 2004-2011 XWiki. All Rights Reserved.