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
-
-
Constructor Summary
Constructors Constructor Description ClassRealmConverter(org.codehaus.classworlds.ClassRealm classRealm)
Deprecated.ClassRealmConverter(org.codehaus.plexus.classworlds.realm.ClassRealm classRealm)
Constructs this ClassRealmConverter with the given ClassRealm.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
canConvert(Class type)
Object
fromConfiguration(ConverterLookup converterLookup, PlexusConfiguration configuration, Class type, Class baseType, ClassLoader classLoader, ExpressionEvaluator expressionEvaluator, ConfigurationListener listener)
void
setClassRealm(org.codehaus.classworlds.ClassRealm classRealm)
Deprecated.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
-
-
-
-
Field Detail
-
ROLE
public static final 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
-ClassRealm
.
-
ClassRealmConverter
@Deprecated public ClassRealmConverter(org.codehaus.classworlds.ClassRealm classRealm)
Deprecated.
-
-
Method Detail
-
setClassRealm
public void setClassRealm(org.codehaus.plexus.classworlds.realm.ClassRealm classRealm)
-
setClassRealm
@Deprecated public void setClassRealm(org.codehaus.classworlds.ClassRealm classRealm)
Deprecated.
-
canConvert
public boolean canConvert(Class type)
-
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
-PlexusConfiguration
type
- 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
-
-