1
2
3
4
5 package org.apache.maven.model;
6
7
8
9
10
11 import java.util.Date;
12
13
14
15
16
17
18 public class PatternSet implements java.io.Serializable {
19
20
21
22
23
24
25
26
27
28 private java.util.List includes;
29
30
31
32
33 private java.util.List excludes;
34
35
36
37
38
39
40
41
42
43
44
45 public void addExclude( String string )
46 {
47 if ( !(string instanceof String) )
48 {
49 throw new ClassCastException( "PatternSet.addExcludes(string) parameter must be instanceof " + String.class.getName() );
50 }
51 getExcludes().add( string );
52 }
53
54
55
56
57
58
59 public void addInclude( String string )
60 {
61 if ( !(string instanceof String) )
62 {
63 throw new ClassCastException( "PatternSet.addIncludes(string) parameter must be instanceof " + String.class.getName() );
64 }
65 getIncludes().add( string );
66 }
67
68
69
70
71
72
73 public java.util.List getExcludes()
74 {
75 if ( this.excludes == null )
76 {
77 this.excludes = new java.util.ArrayList();
78 }
79
80 return this.excludes;
81 }
82
83
84
85
86
87
88 public java.util.List getIncludes()
89 {
90 if ( this.includes == null )
91 {
92 this.includes = new java.util.ArrayList();
93 }
94
95 return this.includes;
96 }
97
98
99
100
101
102
103 public void removeExclude( String string )
104 {
105 if ( !(string instanceof String) )
106 {
107 throw new ClassCastException( "PatternSet.removeExcludes(string) parameter must be instanceof " + String.class.getName() );
108 }
109 getExcludes().remove( string );
110 }
111
112
113
114
115
116
117 public void removeInclude( String string )
118 {
119 if ( !(string instanceof String) )
120 {
121 throw new ClassCastException( "PatternSet.removeIncludes(string) parameter must be instanceof " + String.class.getName() );
122 }
123 getIncludes().remove( string );
124 }
125
126
127
128
129
130
131
132
133
134
135
136 public void setExcludes( java.util.List excludes )
137 {
138 this.excludes = excludes;
139 }
140
141
142
143
144
145
146
147
148
149
150
151 public void setIncludes( java.util.List includes )
152 {
153 this.includes = includes;
154 }
155
156
157
158
159
160
161 public String toString()
162 {
163 StringBuffer sb = new StringBuffer();
164
165 sb.append("PatternSet [includes: {");
166 for (java.util.Iterator i = getIncludes().iterator(); i.hasNext(); )
167 {
168 String str = (String) i.next();
169 sb.append(str).append(", ");
170 }
171 if (sb.substring(sb.length() - 2).equals(", ")) sb.delete(sb.length() - 2, sb.length());
172
173 sb.append("}, excludes: {");
174 for (java.util.Iterator i = getExcludes().iterator(); i.hasNext(); )
175 {
176 String str = (String) i.next();
177 sb.append(str).append(", ");
178 }
179 if (sb.substring(sb.length() - 2).equals(", ")) sb.delete(sb.length() - 2, sb.length());
180
181 sb.append("}]");
182 return sb.toString();
183 }
184
185
186 private String modelEncoding = "UTF-8";
187
188
189
190
191
192
193 public void setModelEncoding( String modelEncoding )
194 {
195 this.modelEncoding = modelEncoding;
196 }
197
198
199
200
201 public String getModelEncoding()
202 {
203 return modelEncoding;
204 }
205 }