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

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

public class DefaultComponentDescriptor<T>
extends DefaultComponentRole<T>
implements ComponentDescriptor<T>

Default implementation of ComponentDescriptor.

Since:
1.7M1
Version:
$Id: fd714166878c074b0c32757ac6487b378d8b48b6 $

Constructor Summary
DefaultComponentDescriptor()
          Default constructor.
DefaultComponentDescriptor(ComponentDescriptor<T> descriptor)
          Creating a new DefaultComponentDescriptor by cloning the provided ComponentDescriptor.
 
Method Summary
<TT> void
addComponentDependency(Class<TT> 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()
           
 
Methods inherited from class org.xwiki.component.descriptor.DefaultComponentRole
getRole, getRoleHint, getRoleType, setRole, setRoleHint, setRoleType
 
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, getRoleType
 

Constructor Detail

DefaultComponentDescriptor

public DefaultComponentDescriptor()
Default constructor.


DefaultComponentDescriptor

public DefaultComponentDescriptor(ComponentDescriptor<T> descriptor)
Creating a new DefaultComponentDescriptor by cloning the provided ComponentDescriptor.

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

setImplementation

public void setImplementation(Class<? extends T> implementation)
Parameters:
implementation - the class of the component implementation

getImplementation

public Class<? extends T> getImplementation()
Specified by:
getImplementation in interface ComponentDescriptor<T>
Returns:
the class of the component implementation

setInstantiationStrategy

public void setInstantiationStrategy(ComponentInstantiationStrategy instantiationStrategy)
Parameters:
instantiationStrategy - the way the component should be instantiated
See Also:
ComponentInstantiationStrategy

getInstantiationStrategy

public ComponentInstantiationStrategy getInstantiationStrategy()
Specified by:
getInstantiationStrategy in interface ComponentDescriptor<T>
Returns:
the way the component should be instantiated
See Also:
ComponentInstantiationStrategy

getComponentDependencies

public Collection<ComponentDependency<?>> getComponentDependencies()
Specified by:
getComponentDependencies in interface ComponentDescriptor<T>
Returns:
the components on which this component depends

addComponentDependency

public void addComponentDependency(ComponentDependency<?> componentDependency)
Parameters:
componentDependency - the dependency to add

addComponentDependency

public <TT> void addComponentDependency(Class<TT> role,
                                        String roleHint)
Type Parameters:
TT - the type of the dependency role
Parameters:
role - the class of the component role
roleHint - the hint of the component role

toString

public String toString()
Overrides:
toString in class DefaultComponentRole<T>

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–2013 XWiki. All rights reserved.