1
2
3
4
5
6
7
8 package org.apache.maven.toolchain.model;
9
10
11
12
13
14
15
16
17
18
19
20 public class PersistedToolchains
21 implements java.io.Serializable
22 {
23
24
25
26
27
28
29
30
31 private java.util.List<ToolchainModel> toolchains;
32
33
34
35
36 private String modelEncoding = "UTF-8";
37
38
39
40
41
42
43
44
45
46
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 }
56
57
58
59
60
61
62
63 public String getModelEncoding()
64 {
65 return modelEncoding;
66 }
67
68
69
70
71
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 }
82
83
84
85
86
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 }
96
97
98
99
100
101
102 public void setModelEncoding( String modelEncoding )
103 {
104 this.modelEncoding = modelEncoding;
105 }
106
107
108
109
110
111
112 public void setToolchains( java.util.List<ToolchainModel> toolchains )
113 {
114 this.toolchains = toolchains;
115 }
116
117
118 }