Class AbstractBasicConverter
- java.lang.Object
-
- org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter
-
- org.codehaus.plexus.component.configurator.converters.basic.AbstractBasicConverter
-
- All Implemented Interfaces:
ConfigurationConverter
- Direct Known Subclasses:
BooleanConverter,ByteConverter,CharConverter,ClassConverter,DateConverter,DoubleConverter,FileConverter,FloatConverter,IntConverter,LongConverter,ShortConverter,StringBufferConverter,StringConverter,UriConverter,UrlConverter
public abstract class AbstractBasicConverter extends AbstractConfigurationConverter
-
-
Constructor Summary
Constructors Constructor Description AbstractBasicConverter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ObjectfromConfiguration(ConverterLookup converterLookup, PlexusConfiguration configuration, Class type, Class baseType, ClassLoader classLoader, ExpressionEvaluator expressionEvaluator, ConfigurationListener listener)protected ObjectfromExpression(PlexusConfiguration configuration, ExpressionEvaluator expressionEvaluator, Class type)protected abstract ObjectfromString(String str)-
Methods inherited from class org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter
fromConfiguration, 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
canConvert
-
-
-
-
Method Detail
-
fromString
protected abstract Object fromString(String str) throws ComponentConfigurationException
- Throws:
ComponentConfigurationException
-
fromExpression
protected Object fromExpression(PlexusConfiguration configuration, ExpressionEvaluator expressionEvaluator, Class type) throws ComponentConfigurationException
- Overrides:
fromExpressionin classAbstractConfigurationConverter- Throws:
ComponentConfigurationException
-
fromConfiguration
public Object fromConfiguration(ConverterLookup converterLookup, PlexusConfiguration configuration, Class type, Class baseType, ClassLoader classLoader, ExpressionEvaluator expressionEvaluator, ConfigurationListener listener) throws ComponentConfigurationException
- Parameters:
converterLookup- Repository of available convertersconfiguration-PlexusConfigurationtype- the type of object to readbaseType- the type of object the the source isclassLoader- ClassLoader which should be used for loading classesexpressionEvaluator- the expression evaluator to use for expressionslistener-ConfigurationListener.- Returns:
- the object
- Throws:
ComponentConfigurationException- in case of an error. TODO: a better way, instead of baseType, would be to pass in a factory for new classes that could be based from the given package
-
-