View Javadoc
1   /*
2    Licensed to the Apache Software Foundation (ASF) under one
3    or more contributor license agreements.  See the NOTICE file
4    distributed with this work for additional information
5    regarding copyright ownership.  The ASF licenses this file
6    to you under the Apache License, Version 2.0 (the
7    "License"); you may not use this file except in compliance
8    with the License.  You may obtain a copy of the License at
9    
10       http://www.apache.org/licenses/LICENSE-2.0
11   
12   Unless required by applicable law or agreed to in writing,
13   software distributed under the License is distributed on an
14   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   KIND, either express or implied.  See the License for the
16   specific language governing permissions and limitations
17   under the License.
18   =================== DO NOT EDIT THIS FILE ====================
19   Generated by Modello 2.4.0,
20   any modifications will be overwritten.
21   ==============================================================
22   */
23  
24  package org.apache.maven.toolchain.model;
25  
26  /**
27   * 
28   *          The <code>&lt;toolchains&gt;</code> element is the root
29   * of the descriptor.
30   *          The following table lists all of the possible child
31   * elements.
32   *             
33   * 
34   * @version $Revision$ $Date$
35   */
36  @SuppressWarnings( "all" )
37  public class PersistedToolchains
38      extends TrackableBase
39      implements java.io.Serializable, java.lang.Cloneable
40  {
41  
42        //--------------------------/
43       //- Class/Member Variables -/
44      //--------------------------/
45  
46      /**
47       * Field toolchains.
48       */
49      private java.util.List<ToolchainModel> toolchains;
50  
51      /**
52       * Field modelEncoding.
53       */
54      private String modelEncoding = "UTF-8";
55  
56  
57        //-----------/
58       //- Methods -/
59      //-----------/
60  
61      /**
62       * Method addToolchain.
63       * 
64       * @param toolchainModel a toolchainModel object.
65       */
66      public void addToolchain( ToolchainModel toolchainModel )
67      {
68          getToolchains().add( toolchainModel );
69      } //-- void addToolchain( ToolchainModel )
70  
71      /**
72       * Method clone.
73       * 
74       * @return PersistedToolchains
75       */
76      public PersistedToolchains clone()
77      {
78          try
79          {
80              PersistedToolchains copy = (PersistedToolchains) super.clone();
81  
82              if ( this.toolchains != null )
83              {
84                  copy.toolchains = new java.util.ArrayList<ToolchainModel>();
85                  for ( ToolchainModel item : this.toolchains )
86                  {
87                      copy.toolchains.add( ( (ToolchainModel) item).clone() );
88                  }
89              }
90  
91              return copy;
92          }
93          catch ( java.lang.Exception ex )
94          {
95              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
96                  + " does not support clone()" ).initCause( ex );
97          }
98      } //-- PersistedToolchains clone()
99  
100     /**
101      * Get the modelEncoding field.
102      * 
103      * @return String
104      */
105     public String getModelEncoding()
106     {
107         return this.modelEncoding;
108     } //-- String getModelEncoding()
109 
110     /**
111      * Method getToolchains.
112      * 
113      * @return List
114      */
115     public java.util.List<ToolchainModel> getToolchains()
116     {
117         if ( this.toolchains == null )
118         {
119             this.toolchains = new java.util.ArrayList<ToolchainModel>();
120         }
121 
122         return this.toolchains;
123     } //-- java.util.List<ToolchainModel> getToolchains()
124 
125     /**
126      * Method removeToolchain.
127      * 
128      * @param toolchainModel a toolchainModel object.
129      */
130     public void removeToolchain( ToolchainModel toolchainModel )
131     {
132         getToolchains().remove( toolchainModel );
133     } //-- void removeToolchain( ToolchainModel )
134 
135     /**
136      * Set the modelEncoding field.
137      * 
138      * @param modelEncoding a modelEncoding object.
139      */
140     public void setModelEncoding( String modelEncoding )
141     {
142         this.modelEncoding = modelEncoding;
143     } //-- void setModelEncoding( String )
144 
145     /**
146      * Set the toolchain instance definition.
147      * 
148      * @param toolchains a toolchains object.
149      */
150     public void setToolchains( java.util.List<ToolchainModel> toolchains )
151     {
152         this.toolchains = toolchains;
153     } //-- void setToolchains( java.util.List )
154 
155 }