1 /*
2 =================== DO NOT EDIT THIS FILE ====================
3 Generated by Modello 1.0.1 on 2009-09-09 03:30:24,
4 any modifications will be overwritten.
5 ==============================================================
6 */
7
8 package org.apache.maven.toolchain.model;
9
10 /**
11 *
12 * The <code><toolchains></code> element is the root
13 * of the descriptor.
14 * The following table lists all of the possible child
15 * elements.
16 *
17 *
18 * @version $Revision$ $Date$
19 */
20 public class PersistedToolchains
21 implements java.io.Serializable
22 {
23
24 //--------------------------/
25 //- Class/Member Variables -/
26 //--------------------------/
27
28 /**
29 * Field toolchains.
30 */
31 private java.util.List<ToolchainModel> toolchains;
32
33 /**
34 * Field modelEncoding.
35 */
36 private String modelEncoding = "UTF-8";
37
38
39 //-----------/
40 //- Methods -/
41 //-----------/
42
43 /**
44 * Method addToolchain.
45 *
46 * @param toolchainModel
47 */
48 public void addToolchain( ToolchainModel toolchainModel )
49 {
50 if ( !(toolchainModel instanceof ToolchainModel) )
51 {
52 throw new ClassCastException( "PersistedToolchains.addToolchains(toolchainModel) parameter must be instanceof " + ToolchainModel.class.getName() );
53 }
54 getToolchains().add( toolchainModel );
55 } //-- void addToolchain( ToolchainModel )
56
57 /**
58 * Method getModelEncoding.
59 *
60 * @return the current encoding used when reading/writing this
61 * model
62 */
63 public String getModelEncoding()
64 {
65 return modelEncoding;
66 } //-- String getModelEncoding()
67
68 /**
69 * Method getToolchains.
70 *
71 * @return List
72 */
73 public java.util.List<ToolchainModel> getToolchains()
74 {
75 if ( this.toolchains == null )
76 {
77 this.toolchains = new java.util.ArrayList<ToolchainModel>();
78 }
79
80 return this.toolchains;
81 } //-- java.util.List<ToolchainModel> getToolchains()
82
83 /**
84 * Method removeToolchain.
85 *
86 * @param toolchainModel
87 */
88 public void removeToolchain( ToolchainModel toolchainModel )
89 {
90 if ( !(toolchainModel instanceof ToolchainModel) )
91 {
92 throw new ClassCastException( "PersistedToolchains.removeToolchains(toolchainModel) parameter must be instanceof " + ToolchainModel.class.getName() );
93 }
94 getToolchains().remove( toolchainModel );
95 } //-- void removeToolchain( ToolchainModel )
96
97 /**
98 * Set an encoding used for reading/writing the model.
99 *
100 * @param modelEncoding
101 */
102 public void setModelEncoding( String modelEncoding )
103 {
104 this.modelEncoding = modelEncoding;
105 } //-- void setModelEncoding( String )
106
107 /**
108 * Set the toolchain definition.
109 *
110 * @param toolchains
111 */
112 public void setToolchains( java.util.List<ToolchainModel> toolchains )
113 {
114 this.toolchains = toolchains;
115 } //-- void setToolchains( java.util.List )
116
117
118 }