org.xwiki.component.descriptor
Class DefaultComponentDependency<T>

java.lang.Object
  extended by org.xwiki.component.descriptor.DefaultComponentRole<T>
      extended by org.xwiki.component.descriptor.DefaultComponentDependency<T>
Type Parameters:
T - the type of the component role
All Implemented Interfaces:
ComponentDependency<T>, ComponentRole<T>

public class DefaultComponentDependency<T>
extends DefaultComponentRole<T>
implements ComponentDependency<T>

Default implementation of ComponentDependency.

Since:
1.7M1
Version:
$Id: d1e352c9e6bd152b8e4939a80ab14a07da7d7b65 $

Constructor Summary
DefaultComponentDependency()
           
 
Method Summary
 boolean equals(Object object)
          
 String[] getHints()
           
 Class<?> getMappingType()
           
 String getName()
           
 int hashCode()
          
 void setHints(String[] hints)
           
 void setMappingType(Class<?> mappingType)
           
 void setName(String name)
           
 
Methods inherited from class org.xwiki.component.descriptor.DefaultComponentRole
getRole, getRoleHint, setRole, setRoleHint, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xwiki.component.descriptor.ComponentRole
getRole, getRoleHint
 

Constructor Detail

DefaultComponentDependency

public DefaultComponentDependency()
Method Detail

getMappingType

public Class<?> getMappingType()
Specified by:
getMappingType in interface ComponentDependency<T>
Returns:
the class of the type for the injection (java.lang.String, java.util.List, etc)

getName

public String getName()
Specified by:
getName in interface ComponentDependency<T>
Returns:
the name of the injection point (can be the name of the field for field injection or the name of the method for method injection

getHints

public String[] getHints()
Specified by:
getHints in interface ComponentDependency<T>
Returns:
a list of hints used when the mapping type is a collection or map so that only component implementations matching passed hints are injected

setMappingType

public void setMappingType(Class<?> mappingType)
Parameters:
mappingType - the class of the type for the injection (java.lang.String, java.util.List, etc)

setName

public void setName(String name)
Parameters:
name - the name of the injection point (can be the name of the field for field injection or the name of the method for method injection

setHints

public void setHints(String[] hints)
Parameters:
hints - a list of hints used when the mapping type is a collection or map so that only component implementations matching passed hints are injected

equals

public boolean equals(Object object)

Overrides:
equals in class DefaultComponentRole<T>
Since:
3.3M1

hashCode

public int hashCode()

Overrides:
hashCode in class DefaultComponentRole<T>
Since:
3.3M1


Copyright © 2004-2011 XWiki. All Rights Reserved.