Class ComponentDescriptor<T>
java.lang.Object
org.codehaus.plexus.component.repository.ComponentDescriptor<T>
Component instantiation description.
- Author:
- Jason van Zyl, bob mcwhirter, Michal Maczka
-
Constructor Summary
ConstructorsConstructorDescriptionComponentDescriptor(Class<T> implementationClass, org.codehaus.plexus.classworlds.realm.ClassRealm realm) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRequirement(ComponentRequirement requirement) Add a project requirement to this component.voidaddRequirement(ComponentRequirement... requirement) Add a project requirement to this component.voidaddRequirements(List<ComponentRequirement> requirements) Adds a list of requirements to this component.booleangetAlias()Returns an alias for this component.Returns the ID of the type of composer this component will use.Returns the type of component configurator for this project.Returns an id of the factory used to create this component.Returns the component set descriptor.Returns the type of this component.Returns configuration values defined for this component.Return a human-readable description of this component.Returns a human-friendly key, suitable for display.Returns the implementation of this componet.Returns the implementation class of this componet, or null if the implementation class can not be loaded.Returns the type of instantiation strategy for this component.Returns the lifecycle-handler for this component.org.codehaus.plexus.classworlds.realm.ClassRealmgetRealm()The ClassRealm that this component lives under.Returns all project requirements of this component.getRole()Returns the role of this component.Returns the role-hint of this component.The location this information came from (descriptor file URI).Returns a specific point in a components's project timeline. i.e. version 1, or 2.1.4booleanReturns true if this component has a configuration.inthashCode()booleanReturns true if this may be in an isolated classrealm.voidremoveRequirement(ComponentRequirement... requirement) Remove a project requirement from this component.voidremoveRequirements(List<ComponentRequirement> requirements) Removes a list of requirements from this component.voidSets the alias for this component.voidsetComponentComposer(String componentComposer) Sets a representation of the composer this component uses.voidsetComponentConfigurator(String componentConfigurator) Sets the type of component configurator for this project.voidsetComponentFactory(String componentFactory) Sets the id of the factory to use to create this component.voidsetComponentProfile(String componentProfile) voidsetComponentSetDescriptor(ComponentSetDescriptor componentSetDescriptor) Sets the component set descriptor of components and dependencies for this component.voidsetComponentType(String componentType) Sets this component's type.voidsetConfiguration(PlexusConfiguration configuration) Sets the configuration hierarchy for this component.voidsetDescription(String description) Sets a description of this component for users to read.voidsetImplementation(String implementation) Sets the implementation of this componet.voidsetImplementationClass(Class<? extends T> implementationClass) voidsetInstantiationStrategy(String instantiationStrategy) Sets the instantiation-strategy for this component.voidsetIsolatedRealm(boolean isolatedRealm) Sets that this component may be in an isolated classrealm.voidsetLifecycleHandler(String lifecycleHandler) Sets the lifecycle-handler for this component.voidsetRealm(org.codehaus.plexus.classworlds.realm.ClassRealm realm) Set the ClassRealm that this component lives under.voidSets the role of this component.voidsetRoleClass(Class<T> roleClass) voidsetRoleHint(String roleHint) Sets the role-hint of this component.voidThe location this information came from (descriptor file URI).voidsetVersion(String version) Sets the point in a components's project development timelinetoString()
-
Constructor Details
-
ComponentDescriptor
public ComponentDescriptor() -
ComponentDescriptor
-
-
Method Details
-
setSource
The location this information came from (descriptor file URI).- Parameters:
source- The source of the descriptor.
-
getSource
The location this information came from (descriptor file URI).- Returns:
- The source.
-
getHumanReadableKey
Returns a human-friendly key, suitable for display.- Returns:
- a human-friendly key
-
getAlias
Returns an alias for this component. An alias as an alternate name other than the normal key.- Returns:
- an alias for this component
-
setAlias
Sets the alias for this component.- Parameters:
alias- alternate name to set
-
getRole
Returns the role of this component.- Returns:
- the role of this component
-
getRoleClass
-
setRole
Sets the role of this component.- Parameters:
role- this component's role
-
setRoleClass
-
getRoleHint
Returns the role-hint of this component.- Returns:
- the role-hint of this component
-
setRoleHint
Sets the role-hint of this component. Pasing null will set the hint to the default value.- Parameters:
roleHint- this component's role-hint
-
getImplementation
Returns the implementation of this componet. Implementation is a string denoting a FQCN in normal Java components, or some other name or file for other component factory implementations.- Returns:
- the implementation of this componet's role.
-
setImplementation
Sets the implementation of this componet.- Parameters:
implementation- string denoting a FQCN in normal Java components, or some other name or file for other component factory implementations
-
getImplementationClass
Returns the implementation class of this componet, or null if the implementation class can not be loaded.- Returns:
- the implementation of this componet's role.
-
setImplementationClass
-
getVersion
Returns a specific point in a components's project timeline. i.e. version 1, or 2.1.4- Returns:
- a specific point in a components's project timeline
-
setVersion
Sets the point in a components's project development timeline- Parameters:
version- the components's version
-
getComponentType
Returns the type of this component.- Returns:
- the type of this component
-
setComponentType
Sets this component's type.- Parameters:
componentType- the type to set
-
getInstantiationStrategy
Returns the type of instantiation strategy for this component.- Returns:
- the type of instantiation strategy for this component
-
getConfiguration
Returns configuration values defined for this component.- Returns:
- configuration values defined for this component
-
setConfiguration
Sets the configuration hierarchy for this component.- Parameters:
configuration- the configuration hierarchy to set
-
hasConfiguration
public boolean hasConfiguration()Returns true if this component has a configuration.- Returns:
- true if this component has a configuration
-
getLifecycleHandler
Returns the lifecycle-handler for this component.- Returns:
- the lifecycle-handler for this component
-
setLifecycleHandler
Sets the lifecycle-handler for this component. For example, "basic", "passive", "bootstrap".- Parameters:
lifecycleHandler- the lifecycle handler string to set
-
getComponentProfile
-
setComponentProfile
-
addRequirement
Add a project requirement to this component.- Parameters:
requirement- the requirement to add
-
addRequirement
Add a project requirement to this component.- Parameters:
requirement- the requirement to add
-
addRequirements
Adds a list of requirements to this component.- Parameters:
requirements- the requirements to add
-
removeRequirement
Remove a project requirement from this component.- Parameters:
requirement- the requirement to remove
-
removeRequirements
Removes a list of requirements from this component.- Parameters:
requirements- the requirements to remove
-
getRequirements
Returns all project requirements of this component.- Returns:
- all project requirements of this component
-
getComponentFactory
Returns an id of the factory used to create this component.- Returns:
- an id of the factory used to create this component
-
setComponentFactory
Sets the id of the factory to use to create this component. For example, "jruby" will use a JRuby factory.- Parameters:
componentFactory- The componentFactor.
-
getComponentComposer
Returns the ID of the type of composer this component will use. For example, "setter" or "field" for the different types of dependency injection.- Returns:
- the ID of the type of composer this component will use
-
setComponentComposer
Sets a representation of the composer this component uses.- Parameters:
componentComposer- string representation of the composer to use
-
getDescription
Return a human-readable description of this component.- Returns:
- a human-readable description of this component
-
setDescription
Sets a description of this component for users to read.- Parameters:
description- a human-readable description of this component
-
setInstantiationStrategy
Sets the instantiation-strategy for this component. For example, "container".- Parameters:
instantiationStrategy- The strategy.
-
isIsolatedRealm
public boolean isIsolatedRealm()Returns true if this may be in an isolated classrealm.- Returns:
- true if this may be in an isolated classrealm
-
setComponentSetDescriptor
Sets the component set descriptor of components and dependencies for this component.- Parameters:
componentSetDescriptor- the component set descriptor of components and dependencies
-
getComponentSetDescriptor
Returns the component set descriptor.- Returns:
- the component set descriptor
-
setIsolatedRealm
public void setIsolatedRealm(boolean isolatedRealm) Sets that this component may be in an isolated classrealm.- Parameters:
isolatedRealm- true if this component may be in an isolated classrealm
-
getComponentConfigurator
Returns the type of component configurator for this project. For example "basic" for normal, or "map-oriented" for map oriented components.- Returns:
- the type of component configurator for this project
-
setComponentConfigurator
Sets the type of component configurator for this project.- Parameters:
componentConfigurator- The component configurator.
-
getRealm
public org.codehaus.plexus.classworlds.realm.ClassRealm getRealm()The ClassRealm that this component lives under.- Returns:
- ClassRealm that this component lives under
-
setRealm
public void setRealm(org.codehaus.plexus.classworlds.realm.ClassRealm realm) Set the ClassRealm that this component lives under.- Parameters:
realm- the ClassRealm that this component lives under
-
toString
-
equals
-
hashCode
public int hashCode()
-