001// =================== DO NOT EDIT THIS FILE ====================
002// Generated by Modello 1.8.1,
003// any modifications will be overwritten.
004// ==============================================================
005
006package org.apache.maven.toolchain.model;
007
008/**
009 * 
010 *          The <code>&lt;toolchains&gt;</code> element is the root
011 * of the descriptor.
012 *          The following table lists all of the possible child
013 * elements.
014 *             
015 * 
016 * @version $Revision$ $Date$
017 */
018@SuppressWarnings( "all" )
019public class PersistedToolchains
020    extends TrackableBase
021    implements java.io.Serializable, java.lang.Cloneable
022{
023
024      //--------------------------/
025     //- Class/Member Variables -/
026    //--------------------------/
027
028    /**
029     * Field toolchains.
030     */
031    private java.util.List<ToolchainModel> toolchains;
032
033    /**
034     * Field modelEncoding.
035     */
036    private String modelEncoding = "UTF-8";
037
038
039      //-----------/
040     //- Methods -/
041    //-----------/
042
043    /**
044     * Method addToolchain.
045     * 
046     * @param toolchainModel
047     */
048    public void addToolchain( ToolchainModel toolchainModel )
049    {
050        getToolchains().add( toolchainModel );
051    } //-- void addToolchain( ToolchainModel )
052
053    /**
054     * Method clone.
055     * 
056     * @return PersistedToolchains
057     */
058    public PersistedToolchains clone()
059    {
060        try
061        {
062            PersistedToolchains copy = (PersistedToolchains) super.clone();
063
064            if ( this.toolchains != null )
065            {
066                copy.toolchains = new java.util.ArrayList<ToolchainModel>();
067                for ( ToolchainModel item : this.toolchains )
068                {
069                    copy.toolchains.add( ( (ToolchainModel) item).clone() );
070                }
071            }
072
073            return copy;
074        }
075        catch ( java.lang.Exception ex )
076        {
077            throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
078                + " does not support clone()" ).initCause( ex );
079        }
080    } //-- PersistedToolchains clone()
081
082    /**
083     * Get the modelEncoding field.
084     * 
085     * @return String
086     */
087    public String getModelEncoding()
088    {
089        return this.modelEncoding;
090    } //-- String getModelEncoding()
091
092    /**
093     * Method getToolchains.
094     * 
095     * @return List
096     */
097    public java.util.List<ToolchainModel> getToolchains()
098    {
099        if ( this.toolchains == null )
100        {
101            this.toolchains = new java.util.ArrayList<ToolchainModel>();
102        }
103
104        return this.toolchains;
105    } //-- java.util.List<ToolchainModel> getToolchains()
106
107    /**
108     * Method removeToolchain.
109     * 
110     * @param toolchainModel
111     */
112    public void removeToolchain( ToolchainModel toolchainModel )
113    {
114        getToolchains().remove( toolchainModel );
115    } //-- void removeToolchain( ToolchainModel )
116
117    /**
118     * Set the modelEncoding field.
119     * 
120     * @param modelEncoding
121     */
122    public void setModelEncoding( String modelEncoding )
123    {
124        this.modelEncoding = modelEncoding;
125    } //-- void setModelEncoding( String )
126
127    /**
128     * Set the toolchain instance definition.
129     * 
130     * @param toolchains
131     */
132    public void setToolchains( java.util.List<ToolchainModel> toolchains )
133    {
134        this.toolchains = toolchains;
135    } //-- void setToolchains( java.util.List )
136
137}