org.codehaus.plexus.component.configurator.converters.composite
Class CollectionConverter

java.lang.Object
  extended by org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter
      extended by org.codehaus.plexus.component.configurator.converters.composite.CollectionConverter
All Implemented Interfaces:
ConfigurationConverter, ParameterizedConfigurationConverter

public class CollectionConverter
extends AbstractConfigurationConverter
implements ParameterizedConfigurationConverter

Version:
$Id: CollectionConverter.java 8004 2009-01-04 18:39:40Z bentmann $
Author:
Michal Maczka

Constructor Summary
CollectionConverter()
           
 
Method Summary
 boolean canConvert(java.lang.Class type)
           
 java.lang.Object fromConfiguration(ConverterLookup converterLookup, PlexusConfiguration configuration, java.lang.Class<?> type, java.lang.reflect.Type[] typeArguments, java.lang.Class<?> baseType, java.lang.ClassLoader classLoader, ExpressionEvaluator expressionEvaluator, ConfigurationListener listener)
           
 java.lang.Object fromConfiguration(ConverterLookup converterLookup, PlexusConfiguration configuration, java.lang.Class type, java.lang.Class baseType, java.lang.ClassLoader classLoader, ExpressionEvaluator expressionEvaluator, ConfigurationListener listener)
           
protected  java.util.Collection getDefaultCollection(java.lang.Class collectionType)
           
 
Methods inherited from class org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter
failIfNotTypeCompatible, 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
 
Methods inherited from interface org.codehaus.plexus.component.configurator.converters.ConfigurationConverter
fromConfiguration
 

Constructor Detail

CollectionConverter

public CollectionConverter()
Method Detail

canConvert

public boolean canConvert(java.lang.Class type)
Specified by:
canConvert in interface ConfigurationConverter

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
Specified by:
fromConfiguration in interface ConfigurationConverter
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

fromConfiguration

public java.lang.Object fromConfiguration(ConverterLookup converterLookup,
                                          PlexusConfiguration configuration,
                                          java.lang.Class<?> type,
                                          java.lang.reflect.Type[] typeArguments,
                                          java.lang.Class<?> baseType,
                                          java.lang.ClassLoader classLoader,
                                          ExpressionEvaluator expressionEvaluator,
                                          ConfigurationListener listener)
                                   throws ComponentConfigurationException
Specified by:
fromConfiguration in interface ParameterizedConfigurationConverter
Parameters:
converterLookup - Repository of available converters
type - the type of object to read
typeArguments - The type arguments for the generic type being configured, may be null.
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

getDefaultCollection

protected java.util.Collection getDefaultCollection(java.lang.Class collectionType)


Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.