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

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

public class DefaultComponentRole<T>
extends Object
implements ComponentRole<T>


Constructor Summary
DefaultComponentRole()
          Default constructor.
DefaultComponentRole(ComponentRole<T> componentRole)
          Create a new DefaultComponentRole by cloning the provided ComponentRole.
 
Method Summary
 boolean equals(Object object)
          
 Class<T> getRole()
          Deprecated. 
 String getRoleHint()
           
 Type getRoleType()
           
 int hashCode()
          
 void setRole(Class<T> role)
          Deprecated. since 4.0M1 use setRoleType(Type) instead
 void setRoleHint(String roleHint)
           
 void setRoleType(Type roleType)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultComponentRole

public DefaultComponentRole()
Default constructor.


DefaultComponentRole

public DefaultComponentRole(ComponentRole<T> componentRole)
Create a new DefaultComponentRole by cloning the provided ComponentRole.

Parameters:
componentRole - the component role to clone
Since:
3.4M1
Method Detail

getRoleType

public Type getRoleType()
Specified by:
getRoleType in interface ComponentRole<T>
Returns:
the class of the component role

setRoleType

public void setRoleType(Type roleType)
Parameters:
roleType - the type of the role

setRoleHint

public void setRoleHint(String roleHint)
Parameters:
roleHint - the hint of the component role

getRoleHint

public String getRoleHint()
Specified by:
getRoleHint in interface ComponentRole<T>
Returns:
the hint of the component role

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object object)

Overrides:
equals in class Object
Since:
3.3M1

hashCode

public int hashCode()

Overrides:
hashCode in class Object
Since:
3.3M1

setRole

@Deprecated
public void setRole(Class<T> role)
Deprecated. since 4.0M1 use setRoleType(Type) instead

Parameters:
role - the class of the component role

getRole

@Deprecated
public Class<T> getRole()
Deprecated. 

Specified by:
getRole in interface ComponentRole<T>
Returns:
the class of the component role