Interface ConfigurationConverter
-
- All Known Implementing Classes:
AbstractBasicConverter,AbstractConfigurationConverter,ArrayConverter,BooleanConverter,ByteConverter,CharConverter,ClassConverter,ClassRealmConverter,CollectionConverter,DateConverter,DoubleConverter,EnumConverter,FileConverter,FloatConverter,IntConverter,LongConverter,MapConverter,ObjectWithFieldsConverter,PlexusConfigurationConverter,PropertiesConverter,ShortConverter,StringBufferConverter,StringConverter,UriConverter,UrlConverter
public interface ConfigurationConverter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanConvert(Class type)ObjectfromConfiguration(ConverterLookup converterLookup, PlexusConfiguration configuration, Class type, Class baseType, ClassLoader classLoader, ExpressionEvaluator expressionEvaluator)ObjectfromConfiguration(ConverterLookup converterLookup, PlexusConfiguration configuration, Class type, Class baseType, ClassLoader classLoader, ExpressionEvaluator expressionEvaluator, ConfigurationListener listener)
-
-
-
Method Detail
-
canConvert
boolean canConvert(Class type)
-
fromConfiguration
Object fromConfiguration(ConverterLookup converterLookup, PlexusConfiguration configuration, Class type, Class baseType, ClassLoader classLoader, ExpressionEvaluator expressionEvaluator) 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 expressions- 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
-
fromConfiguration
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
-
-