org.xwiki.component.annotation
Class AbstractComponentDependencyFactory

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

public abstract class AbstractComponentDependencyFactory
extends Object
implements ComponentDependencyFactory

Provides useful methods for implementing ComponentDependencyFactory.

Since:
3.2RC1
Version:
$Id: 13de62a98851edc5fade0b94507a3cc9b0b1e4e3 $

Constructor Summary
AbstractComponentDependencyFactory()
           
 
Method Summary
protected  Class<?> getGenericRole(Field field)
          Extract generic type from the list field.
protected  boolean isDependencyOfListType(Class<?> type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xwiki.component.annotation.ComponentDependencyFactory
createComponentDependency
 

Constructor Detail

AbstractComponentDependencyFactory

public AbstractComponentDependencyFactory()
Method Detail

isDependencyOfListType

protected boolean isDependencyOfListType(Class<?> type)
Parameters:
type - the type for which to verify if it's a list or not
Returns:
true if the type is a list (Collection or Map), false otherwise

getGenericRole

protected Class<?> getGenericRole(Field field)
Extract generic type from the list field.

Parameters:
field - the list field to inject
Returns:
the role of the components in the list


Copyright © 2004-2011 XWiki. All Rights Reserved.