throws PlexusConfigurationException
{
String implementation = configuration.getChild( "implementation" ).getValue();
if (implementation == null)
{
throw new PlexusConfigurationException( "implementation is null" );
}
ComponentDescriptor<?> cd;
try
{
if ( realm != null )
{
Class<?> implementationClass = realm.loadClass( implementation );
cd = new ComponentDescriptor(implementationClass, realm);
}
else
{
cd = new ComponentDescriptor();
cd.setImplementation( implementation );
}
}
catch ( Throwable e )
{
throw new PlexusConfigurationException("Can not load implementation class " + implementation +
" from realm " + realm, e);
}
cd.setRole( configuration.getChild( "role" ).getValue() );