class EnhancedConfigurationConverter extends ObjectWithFieldsConverter {
    protected Object fromExpression(
            final PlexusConfiguration configuration, final ExpressionEvaluator evaluator, final Class<?> type)
            throws ComponentConfigurationException {
        String value = configuration.getValue();
        try {
            Object result = null;
            if (null != value && !value.isEmpty()) {
                if (evaluator instanceof TypeAwareExpressionEvaluator) {
                    result = ((TypeAwareExpressionEvaluator) evaluator).evaluate(value, type);
                } else {
                    result = evaluator.evaluate(value);
                }
            }
            if (null == result && configuration.getChildCount() == 0) {
                value = configuration.getAttribute("default-value");
                if (null != value && !value.isEmpty()) {
                    if (evaluator instanceof TypeAwareExpressionEvaluator) {
                        result = ((TypeAwareExpressionEvaluator) evaluator).evaluate(value, type);
                    } else {
                        result = evaluator.evaluate(value);
                    }
                }
            }
            failIfNotTypeCompatible(result, type, configuration);
            return result;
        } catch (final ExpressionEvaluationException e) {
            final String reason = String.format(
                    "Cannot evaluate expression '%s' for configuration entry '%s'", value, configuration.getName());

            throw new ComponentConfigurationException(configuration, reason, e);
        }
    }

    public Object fromConfiguration(
            final ConverterLookup lookup,
            final PlexusConfiguration configuration,
            final Class<?> type,
            final Class<?> enclosingType,
            final ClassLoader loader,
            final ExpressionEvaluator evaluator,
            final ConfigurationListener listener)
            throws ComponentConfigurationException {<FILL_FUNCTION_BODY>}
}

        final Object value = fromExpression(configuration, evaluator, type);
        if (type.isInstance(value)) {
            return value;
        }
        try {
            final Class<?> implType = getClassForImplementationHint(type, configuration, loader);
            if (null == value && implType.isInterface() && configuration.getChildCount() == 0) {
                return null; // nothing to process
            }
            final Object bean = instantiateObject(implType);
            if (null == value) {
                processConfiguration(lookup, bean, loader, configuration, evaluator, listener);
            } else {
                new CompositeBeanHelper(lookup, loader, evaluator, listener).setDefault(bean, value, configuration);
            }
            return bean;
        } catch (final ComponentConfigurationException e) {
            if (null == e.getFailedConfiguration()) {
                e.setFailedConfiguration(configuration);
            }
            throw e;
        }
    
<methods>public void <init>() ,public boolean canConvert(Class#RAW) ,public java.lang.Object fromConfiguration(org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup, org.codehaus.plexus.configuration.PlexusConfiguration, Class#RAW, Class#RAW, java.lang.ClassLoader, org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator, org.codehaus.plexus.component.configurator.ConfigurationListener) throws org.codehaus.plexus.component.configurator.ComponentConfigurationException,public void processConfiguration(org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup, java.lang.Object, java.lang.ClassLoader, org.codehaus.plexus.configuration.PlexusConfiguration) throws org.codehaus.plexus.component.configurator.ComponentConfigurationException,public void processConfiguration(org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup, java.lang.Object, java.lang.ClassLoader, org.codehaus.plexus.configuration.PlexusConfiguration, org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator) throws org.codehaus.plexus.component.configurator.ComponentConfigurationException,public void processConfiguration(org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup, java.lang.Object, java.lang.ClassLoader, org.codehaus.plexus.configuration.PlexusConfiguration, org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator, org.codehaus.plexus.component.configurator.ConfigurationListener) throws org.codehaus.plexus.component.configurator.ComponentConfigurationException<variables>static Class#RAW class$java$util$Collection,static Class#RAW class$java$util$Dictionary,static Class#RAW class$java$util$Map