org.apache.maven.model.PluginContainer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of virtdata-lib-realer Show documentation
Show all versions of virtdata-lib-realer Show documentation
With inspiration from other libraries
/*
=================== DO NOT EDIT THIS FILE ====================
Generated by Modello 1.0.1 on 2009-08-06 15:13:09,
any modifications will be overwritten.
==============================================================
*/
package org.apache.maven.model;
/**
* Contains the plugins informations for the project.
*
* @version $Revision$ $Date$
*/
public class PluginContainer
implements java.io.Serializable
{
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* Field plugins.
*/
private java.util.List plugins;
//-----------/
//- Methods -/
//-----------/
/**
* Method addPlugin.
*
* @param plugin
*/
public void addPlugin( Plugin plugin )
{
if ( !(plugin instanceof Plugin) )
{
throw new ClassCastException( "PluginContainer.addPlugins(plugin) parameter must be instanceof " + Plugin.class.getName() );
}
getPlugins().add( plugin );
} //-- void addPlugin( Plugin )
/**
* Method getPlugins.
*
* @return List
*/
public java.util.List getPlugins()
{
if ( this.plugins == null )
{
this.plugins = new java.util.ArrayList();
}
return this.plugins;
} //-- java.util.List getPlugins()
/**
* Method removePlugin.
*
* @param plugin
*/
public void removePlugin( Plugin plugin )
{
if ( !(plugin instanceof Plugin) )
{
throw new ClassCastException( "PluginContainer.removePlugins(plugin) parameter must be instanceof " + Plugin.class.getName() );
}
getPlugins().remove( plugin );
} //-- void removePlugin( Plugin )
/**
* Set the list of plugins to use.
*
* @param plugins
*/
public void setPlugins( java.util.List plugins )
{
this.plugins = plugins;
} //-- void setPlugins( java.util.List )
java.util.Map pluginMap;
/**
* Reset the pluginsMap
field to null
*/
public void flushPluginMap()
{
this.pluginMap = null;
}
/**
* @return a Map of plugins field with Plugins#getKey()
as key
* @see org.apache.maven.model.Plugin#getKey()
*/
public java.util.Map getPluginsAsMap()
{
if ( pluginMap == null )
{
pluginMap = new java.util.LinkedHashMap();
if ( plugins != null )
{
for ( java.util.Iterator it = plugins.iterator(); it.hasNext(); )
{
Plugin plugin = (Plugin) it.next();
pluginMap.put( plugin.getKey(), plugin );
}
}
}
return pluginMap;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy