当前位置: 首页>>代码示例>>Java>>正文


Java ConfigurationListener类代码示例

本文整理汇总了Java中org.codehaus.plexus.component.configurator.ConfigurationListener的典型用法代码示例。如果您正苦于以下问题:Java ConfigurationListener类的具体用法?Java ConfigurationListener怎么用?Java ConfigurationListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ConfigurationListener类属于org.codehaus.plexus.component.configurator包,在下文中一共展示了ConfigurationListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configureComponent

import org.codehaus.plexus.component.configurator.ConfigurationListener; //导入依赖的package包/类
@Override
public void configureComponent(final Object component,
                               final PlexusConfiguration configuration,
                               final ExpressionEvaluator expressionEvaluator,
                               final ClassRealm containerRealm,
                               final ConfigurationListener listener)
        throws ComponentConfigurationException {

    addProjectDependenciesToClassRealm(expressionEvaluator, containerRealm);

    this.converterLookup.registerConverter(new ClassRealmConverter(containerRealm));

    final ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter();

    converter.processConfiguration(this.converterLookup, component,
            containerRealm, configuration,
            expressionEvaluator, listener);

}
 
开发者ID:Substeps,项目名称:substeps-framework,代码行数:20,代码来源:IncludeProjectDependenciesComponentConfigurator.java

示例2: ValidatingConfigurationListener

import org.codehaus.plexus.component.configurator.ConfigurationListener; //导入依赖的package包/类
public ValidatingConfigurationListener( Object mojo, MojoDescriptor mojoDescriptor, ConfigurationListener delegate )
{
    this.mojo = mojo;
    this.delegate = delegate;
    this.missingParameters = new HashMap<String, Parameter>();

    if ( mojoDescriptor.getParameters() != null )
    {
        for ( Parameter param : mojoDescriptor.getParameters() )
        {
            if ( param.isRequired() )
            {
                missingParameters.put( param.getName(), param );
            }
        }
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:18,代码来源:ValidatingConfigurationListener.java

示例3: fromConfiguration

import org.codehaus.plexus.component.configurator.ConfigurationListener; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
public Object fromConfiguration(ConverterLookup converterLookup,
		PlexusConfiguration configuration, Class type, Class baseType,
		ClassLoader classLoader, ExpressionEvaluator expressionEvaluator,
		ConfigurationListener listener)
		throws ComponentConfigurationException {
	if (isPropertyEditorSupportConversion(configuration, type, baseType,
			classLoader, expressionEvaluator, listener)) {

		return null;
	} else {
		ConfigurationConverter lookupConverterForType = converterLookup
				.lookupConverterForType(type);
		return lookupConverterForType.fromConfiguration(converterLookup,
				configuration, type, baseType, classLoader,
				expressionEvaluator);
	}
}
 
开发者ID:link-intersystems,项目名称:maven,代码行数:19,代码来源:PropertyEditorSupportConverter.java

示例4: configureComponent

import org.codehaus.plexus.component.configurator.ConfigurationListener; //导入依赖的package包/类
@Override
public void configureComponent(Object component, PlexusConfiguration configuration,
                               ExpressionEvaluator evaluator, ClassRealm realm, ConfigurationListener listener) throws ComponentConfigurationException {
    addProjectDependenciesToClassRealm(evaluator, realm);
    converterLookup.registerConverter(new ClassRealmConverter(realm));
    ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter();
    converter.processConfiguration(converterLookup, component, realm.getParentClassLoader(), configuration,
            evaluator, listener);
}
 
开发者ID:protostuff,项目名称:protostuff-compiler,代码行数:10,代码来源:IncludeProjectDependenciesComponentConfigurator.java

示例5: configureComponent

import org.codehaus.plexus.component.configurator.ConfigurationListener; //导入依赖的package包/类
public void configureComponent(Object component, PlexusConfiguration configuration,
    ExpressionEvaluator expressionEvaluator, ClassRealm containerRealm, ConfigurationListener listener)
    throws ComponentConfigurationException
{
  addProjectDependenciesToClassRealm(expressionEvaluator, containerRealm);
  converterLookup.registerConverter(new ClassRealmConverter(containerRealm));
  ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter();
  converter.processConfiguration(converterLookup, component, containerRealm, configuration, expressionEvaluator,
      listener);
}
 
开发者ID:iisi-nj,项目名称:GemFireLite,代码行数:11,代码来源:DomainMojoConfigurator.java

示例6: configureComponent

import org.codehaus.plexus.component.configurator.ConfigurationListener; //导入依赖的package包/类
public void configureComponent(Object component, PlexusConfiguration configuration,
        ExpressionEvaluator expressionEvaluator, ClassRealm containerRealm, ConfigurationListener listener)
        throws ComponentConfigurationException {

    addProjectDependenciesToClassRealm(expressionEvaluator, containerRealm);
    converterLookup.registerConverter(new ClassRealmConverter(containerRealm));
    ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter();
    converter.processConfiguration(converterLookup, component, containerRealm.getClassLoader(), configuration,
            expressionEvaluator, listener);
}
 
开发者ID:brooklyncentral,项目名称:brooklyn-maven-plugin,代码行数:11,代码来源:IncludeProjectDependenciesComponentConfigurator.java

示例7: configureComponent

import org.codehaus.plexus.component.configurator.ConfigurationListener; //导入依赖的package包/类
public void configureComponent(Object component, PlexusConfiguration configuration,
        ExpressionEvaluator expressionEvaluator, ClassRealm containerRealm,
        ConfigurationListener listener)
        throws ComponentConfigurationException
{

    addProjectDependenciesToClassRealm(expressionEvaluator, containerRealm);
    converterLookup.registerConverter(new ClassRealmConverter(containerRealm));
    ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter();
    converter.processConfiguration(converterLookup, component, containerRealm.getClassLoader(), configuration,
            expressionEvaluator, listener);
}
 
开发者ID:protostuff,项目名称:protostuff,代码行数:13,代码来源:IncludeProjectDependenciesComponentConfigurator.java

示例8: configureComponent

import org.codehaus.plexus.component.configurator.ConfigurationListener; //导入依赖的package包/类
@Override
public void configureComponent(final Object mojoInstance, //
    final PlexusConfiguration pluginConfigurationFromMaven, //
    final ExpressionEvaluator evaluator, //
    final ClassRealm realm, //
    final ConfigurationListener listener) throws ComponentConfigurationException {

  super.configureComponent(mojoInstance, pluginConfigurationFromMaven, evaluator, realm, listener);
}
 
开发者ID:takari,项目名称:takari-lifecycle,代码行数:10,代码来源:MojoConfigurator.java

示例9: fromConfiguration

import org.codehaus.plexus.component.configurator.ConfigurationListener; //导入依赖的package包/类
/**
 * @see org.codehaus.plexus.component.configurator.converters.ConfigurationConverter#fromConfiguration(org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup, org.codehaus.plexus.configuration.PlexusConfiguration, java.lang.Class, java.lang.Class, java.lang.ClassLoader, org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator, org.codehaus.plexus.component.configurator.ConfigurationListener)
 */
public Object fromConfiguration( ConverterLookup converterLookup, PlexusConfiguration configuration, Class type,
                                 Class baseType, ClassLoader classLoader, ExpressionEvaluator expressionEvaluator,
                                 ConfigurationListener listener )
    throws ComponentConfigurationException
{
    return fromConfiguration( configuration, expressionEvaluator );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:11,代码来源:JdkToolchainConverter.java

示例10: ComponentValueSetter

import org.codehaus.plexus.component.configurator.ConfigurationListener; //导入依赖的package包/类
public ComponentValueSetter(final String fieldName,
		final Class implementation, final Object object,
		final ConverterLookup lookup, final ConfigurationListener listener)
		throws ComponentConfigurationException {
	this.fieldName = fieldName;
	this.object = object;
	this.lookup = lookup;
	this.listener = listener;

	if (object == null) {
		throw new ComponentConfigurationException("Component is null");
	}

	initSetter(implementation);

	initField(implementation);

	if (setter == null && field == null) {
		throw new ComponentConfigurationException(
				"Cannot find setter, adder nor field in "
						+ object.getClass().getName() + " for '"
						+ fieldName + "'");
	}

	if (setterTypeConverter == null && fieldTypeConverter == null) {
		throw new ComponentConfigurationException(
				"Cannot find converter for "
						+ setterParamType.getName()
						+ (fieldType != null
								&& !fieldType.equals(setterParamType) ? " or "
								+ fieldType.getName()
								: ""));
	}
}
 
开发者ID:link-intersystems,项目名称:maven,代码行数:35,代码来源:ComponentValueSetter.java

示例11: isPropertyEditorSupportConversion

import org.codehaus.plexus.component.configurator.ConfigurationListener; //导入依赖的package包/类
private boolean isPropertyEditorSupportConversion(
		PlexusConfiguration configuration, Class<?> type,
		Class<?> baseType, ClassLoader classLoader,
		ExpressionEvaluator expressionEvaluator,
		ConfigurationListener listener) {
	// TODO Auto-generated method stub
	return false;
}
 
开发者ID:link-intersystems,项目名称:maven,代码行数:9,代码来源:PropertyEditorSupportConverter.java

示例12: configureComponent

import org.codehaus.plexus.component.configurator.ConfigurationListener; //导入依赖的package包/类
@Override
public void configureComponent(final Object component,
		final PlexusConfiguration configuration,
		final ExpressionEvaluator expressionEvaluator,
		final ClassRealm containerRealm,
		final ConfigurationListener listener)
		throws ComponentConfigurationException {
	converterLookup.registerConverter(new ClassRealmConverter(
			containerRealm));
	PropertyEditorLookup propertyEditorLookup = new PropertyEditorLookup(container);
	PropertyEditorSupportConverter converter = new PropertyEditorSupportConverter(propertyEditorLookup);

	converter.processConfiguration(converterLookup, component,
			containerRealm, configuration, expressionEvaluator, listener);
}
 
开发者ID:link-intersystems,项目名称:maven,代码行数:16,代码来源:PropertyEditorSupportConfigurator.java

示例13: configureComponent

import org.codehaus.plexus.component.configurator.ConfigurationListener; //导入依赖的package包/类
@Override
public void configureComponent(Object component, PlexusConfiguration configuration,
                               ExpressionEvaluator expressionEvaluator, ClassRealm containerRealm,
                               ConfigurationListener listener)
        throws ComponentConfigurationException {
    addProjectDependenciesToClassRealm(expressionEvaluator, containerRealm);

    ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter();
    converter.processConfiguration(converterLookup, component, containerRealm.getClassLoader(), configuration,
            expressionEvaluator, listener);
}
 
开发者ID:kongchen,项目名称:swagger-maven-plugin,代码行数:12,代码来源:IncludeProjectDependenciesComponentConfigurator.java

示例14: configureComponent

import org.codehaus.plexus.component.configurator.ConfigurationListener; //导入依赖的package包/类
@Override
public void configureComponent(Object component, PlexusConfiguration configuration,
		ExpressionEvaluator expressionEvaluator, ClassRealm containerRealm, ConfigurationListener listener)
		throws ComponentConfigurationException {

	addProjectDependenciesToClassRealm(expressionEvaluator, containerRealm);

	converterLookup.registerConverter(new ClassRealmConverter(containerRealm));

	ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter();

	converter.processConfiguration(converterLookup, component, containerRealm.getClassLoader(), configuration,
			expressionEvaluator, listener);
}
 
开发者ID:raphaeljolivet,项目名称:java2typescript,代码行数:15,代码来源:IncludeProjectDependenciesComponentConfigurator.java

示例15: processConfiguration

import org.codehaus.plexus.component.configurator.ConfigurationListener; //导入依赖的package包/类
public void processConfiguration(final ConverterLookup converterLookup,
		final Object object, final ClassLoader classLoader,
		final PlexusConfiguration configuration,
		final ExpressionEvaluator expressionEvaluator,
		final ConfigurationListener listener)
		throws ComponentConfigurationException {
	final int items = configuration.getChildCount();

	for (int i = 0; i < items; i++) {
		final PlexusConfiguration childConfiguration = configuration
				.getChild(i);

		final String elementName = childConfiguration.getName();

		Class<?> implementation;
		try {
			implementation = getClassForImplementationHint(null,
					childConfiguration, classLoader);
		} catch (final Exception e) {
			implementation = null; // fall back to original behavior
		}

		final ComponentValueSetter valueSetter = new ComponentValueSetter(
				fromXML(elementName), implementation, object,
				converterLookup, listener);

		valueSetter.configure(childConfiguration, classLoader,
				expressionEvaluator);
	}

	Class<?> mojoClass = object.getClass();

	while (mojoClass != Object.class) {
		Field[] declaredFields = mojoClass.getDeclaredFields();
		List<PropertyEditorField> editorSupportFields = new ArrayList<PropertyEditorField>();
		for (Field declaredField : declaredFields) {
			if (declaredField.isAnnotationPresent(PropertyEditor.class)) {
				PropertyEditorField propertyEditorField = new PropertyEditorField(
						object, declaredField);
				editorSupportFields.add(propertyEditorField);
			}
		}

		handlePropertyEditorFields(object, editorSupportFields,
				expressionEvaluator);
		mojoClass = mojoClass.getSuperclass();
	}
}
 
开发者ID:link-intersystems,项目名称:maven,代码行数:49,代码来源:PropertyEditorSupportConverter.java


注:本文中的org.codehaus.plexus.component.configurator.ConfigurationListener类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。