org.apache.maven.toolchain.model.PersistedToolchains Maven / Gradle / Ivy
/*
* $Id$
*/
package org.apache.maven.toolchain.model;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
import java.util.Date;
/**
*
* The <project>
element is the root of
* the descriptor.
* The following table lists all of the possible child
* elements.
*
*
* @version $Revision$ $Date$
*/
public class PersistedToolchains implements java.io.Serializable {
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* Field toolchains.
*/
private java.util.List toolchains;
//-----------/
//- Methods -/
//-----------/
/**
* Method addToolchain.
*
* @param toolchainModel
*/
public void addToolchain( ToolchainModel toolchainModel )
{
if ( !(toolchainModel instanceof ToolchainModel) )
{
throw new ClassCastException( "PersistedToolchains.addToolchains(toolchainModel) parameter must be instanceof " + ToolchainModel.class.getName() );
}
getToolchains().add( toolchainModel );
} //-- void addToolchain( ToolchainModel )
/**
* Method getToolchains.
*
* @return java.util.List
*/
public java.util.List getToolchains()
{
if ( this.toolchains == null )
{
this.toolchains = new java.util.ArrayList();
}
return this.toolchains;
} //-- java.util.List getToolchains()
/**
* Method removeToolchain.
*
* @param toolchainModel
*/
public void removeToolchain( ToolchainModel toolchainModel )
{
if ( !(toolchainModel instanceof ToolchainModel) )
{
throw new ClassCastException( "PersistedToolchains.removeToolchains(toolchainModel) parameter must be instanceof " + ToolchainModel.class.getName() );
}
getToolchains().remove( toolchainModel );
} //-- void removeToolchain( ToolchainModel )
/**
* Set the toolchain definition.
*
* @param toolchains
*/
public void setToolchains( java.util.List toolchains )
{
this.toolchains = toolchains;
} //-- void setToolchains( java.util.List )
private String modelEncoding = "UTF-8";
/**
* Set an encoding used for reading/writing the model.
*
* @param modelEncoding the encoding used when reading/writing the model.
*/
public void setModelEncoding( String modelEncoding )
{
this.modelEncoding = modelEncoding;
}
/**
* @return the current encoding used when reading/writing this model.
*/
public String getModelEncoding()
{
return modelEncoding;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy