T
- the type of the component rolepublic class DefaultComponentDescriptor<T> extends DefaultComponentRole<T> implements ComponentDescriptor<T>
ComponentDescriptor
.Constructor and Description |
---|
DefaultComponentDescriptor()
Default constructor.
|
DefaultComponentDescriptor(ComponentDescriptor<T> descriptor)
Creating a new
DefaultComponentDescriptor by cloning the provided ComponentDescriptor . |
Modifier and Type | Method and Description |
---|---|
<D> void |
addComponentDependency(Class<D> role,
String roleHint) |
void |
addComponentDependency(ComponentDependency<?> componentDependency) |
boolean |
equals(Object object) |
Collection<ComponentDependency<?>> |
getComponentDependencies() |
Class<? extends T> |
getImplementation() |
ComponentInstantiationStrategy |
getInstantiationStrategy() |
int |
hashCode() |
void |
setImplementation(Class<? extends T> implementation) |
void |
setInstantiationStrategy(ComponentInstantiationStrategy instantiationStrategy) |
String |
toString() |
getRole, getRoleHint, getRoleType, setRole, setRoleHint, setRoleType
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getRole, getRoleHint, getRoleType
public DefaultComponentDescriptor()
public DefaultComponentDescriptor(ComponentDescriptor<T> descriptor)
DefaultComponentDescriptor
by cloning the provided ComponentDescriptor
.descriptor
- the component descriptor to clonepublic void setImplementation(Class<? extends T> implementation)
implementation
- the class of the component implementationpublic Class<? extends T> getImplementation()
getImplementation
in interface ComponentDescriptor<T>
public void setInstantiationStrategy(ComponentInstantiationStrategy instantiationStrategy)
instantiationStrategy
- the way the component should be instantiatedComponentInstantiationStrategy
public ComponentInstantiationStrategy getInstantiationStrategy()
getInstantiationStrategy
in interface ComponentDescriptor<T>
ComponentInstantiationStrategy
public Collection<ComponentDependency<?>> getComponentDependencies()
getComponentDependencies
in interface ComponentDescriptor<T>
public void addComponentDependency(ComponentDependency<?> componentDependency)
componentDependency
- the dependency to addpublic <D> void addComponentDependency(Class<D> role, String roleHint)
D
- the type of the dependency rolerole
- the class of the component roleroleHint
- the hint of the component rolepublic String toString()
toString
in class DefaultComponentRole<T>
public boolean equals(Object object)
equals
in class DefaultComponentRole<T>
public int hashCode()
hashCode
in class DefaultComponentRole<T>
Copyright © 2004–2021 XWiki. All rights reserved.