org.codehaus.plexus.component.configurator.converters.special

## Class ClassRealmConverter

- java.lang.Object
- - org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter
  - - org.codehaus.plexus.component.configurator.converters.special.ClassRealmConverter

All Implemented Interfaces:
  ConfigurationConverter

    public class ClassRealmConverter
    extends AbstractConfigurationConverter

ConfigurationConverter to set up ClassRealm component fields.

Author:
  Kenney Westerhof

### Field Summary

Fields
`static java.lang.String` `ROLE`

### Constructor Summary

Constructors
Constructor and Description
`ClassRealmConverter(org.codehaus.plexus.classworlds.realm.ClassRealm classRealm)` Constructs this ClassRealmConverter with the given ClassRealm.

### Method Summary

Methods
`boolean` `canConvert(java.lang.Class type)`
`java.lang.Object` `fromConfiguration(ConverterLookup converterLookup, PlexusConfiguration configuration, java.lang.Class type, java.lang.Class baseType, java.lang.ClassLoader classLoader, ExpressionEvaluator expressionEvaluator, ConfigurationListener listener)`
`void` `setClassRealm(org.codehaus.plexus.classworlds.realm.ClassRealm classRealm)`

### Methods inherited from class org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter

`fromConfiguration, fromExpression, fromExpression, fromXML, getClassForImplementationHint, instantiateObject, instantiateObject, loadClass, toXML`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### ROLE

    public static final java.lang.String ROLE

### Constructor Detail

#### ClassRealmConverter

    public ClassRealmConverter(org.codehaus.plexus.classworlds.realm.ClassRealm classRealm)

Constructs this ClassRealmConverter with the given ClassRealm. If there's a way to automatically configure this component using the current classrealm, this method can go away.

Parameters:
  `classRealm` -

### Method Detail

#### setClassRealm

    public void setClassRealm(org.codehaus.plexus.classworlds.realm.ClassRealm classRealm)

#### canConvert

    public boolean canConvert(java.lang.Class type)

#### fromConfiguration

    public java.lang.Object fromConfiguration(ConverterLookup converterLookup,
                                     PlexusConfiguration configuration,
                                     java.lang.Class type,
                                     java.lang.Class baseType,
                                     java.lang.ClassLoader classLoader,
                                     ExpressionEvaluator expressionEvaluator,
                                     ConfigurationListener listener)
                                       throws ComponentConfigurationException

Parameters:
  `converterLookup` - Repository of available converters
  `type` - the type of object to read
  `baseType` - the type of object the the source is
  `classLoader` - ClassLoader which should be used for loading classes
  `expressionEvaluator` - the expression evaluator to use for expressions
Returns:
  the object
Throws:
  `ComponentConfigurationException`