Package org.xwiki.component.descriptor
Class DefaultComponentRole<T>
- java.lang.Object
-
- 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>
- Version:
- $Id: 5e6836c85ef7d4f341666585fd97ed375e443e29 $
-
-
Constructor Summary
Constructors Constructor Description DefaultComponentRole()Default constructor.DefaultComponentRole(Type roleType, String roleHint)DefaultComponentRole(ComponentRole<T> componentRole)Create a newDefaultComponentRoleby cloning the providedComponentRole.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object object)Class<T>getRole()Deprecated.StringgetRoleHint()TypegetRoleType()inthashCode()voidsetRole(Class<T> role)Deprecated.since 4.0M1 usesetRoleType(Type)insteadvoidsetRoleHint(String roleHint)voidsetRoleType(Type roleType)StringtoString()
-
-
-
Constructor Detail
-
DefaultComponentRole
public DefaultComponentRole()
Default constructor.
-
DefaultComponentRole
public DefaultComponentRole(ComponentRole<T> componentRole)
Create a newDefaultComponentRoleby cloning the providedComponentRole.- Parameters:
componentRole- the component role to clone- Since:
- 3.4M1
-
-
Method Detail
-
getRoleType
public Type getRoleType()
- Specified by:
getRoleTypein interfaceComponentRole<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:
getRoleHintin interfaceComponentRole<T>- Returns:
- the hint of the component role
-
setRole
@Deprecated public void setRole(Class<T> role)
Deprecated.since 4.0M1 usesetRoleType(Type)instead- Parameters:
role- the class of the component role
-
getRole
@Deprecated public Class<T> getRole()
Deprecated.- Specified by:
getRolein interfaceComponentRole<T>- Returns:
- the class of the component role
-
-