1
2
3
4
5
6 package org.codehaus.modello.test.features;
7
8
9
10
11
12 import org.codehaus.modello.test.features.other.PackageNameFeature;
13 import org.codehaus.modello.test.features.other.SubInterfaceInPackage;
14
15
16
17
18
19
20 @SuppressWarnings( "all" )
21 public class Thing
22 extends SuperThing
23 implements java.io.Serializable, java.lang.Cloneable
24 {
25
26
27
28
29
30
31
32
33 private boolean someBoolean = false;
34
35
36
37
38 private char someChar = '\0';
39
40
41
42
43 private byte someByte = 0;
44
45
46
47
48 private short someShort = 0;
49
50
51
52
53 private int someInt = 0;
54
55
56
57
58 private long someLong = 0L;
59
60
61
62
63 private float someFloat = 0.0f;
64
65
66
67
68 private double someDouble = 0.0;
69
70
71
72
73 private String someString;
74
75
76
77
78 private java.util.Date someDate;
79
80
81
82
83 private Object someDom;
84
85
86
87
88 private java.util.Properties someProperties;
89
90
91
92
93 private java.util.List<String> someStringList;
94
95
96
97
98 private java.util.Set<String> someStringSet;
99
100
101
102
103 private Thingy deepThingy;
104
105
106
107
108 private java.util.List<Thingy> deepThingyList;
109
110
111
112
113 private java.util.Set<Thingy> deepThingySet;
114
115
116
117
118 private Thingy shallowThingy;
119
120
121
122
123 private java.util.List<Thingy> shallowThingyList;
124
125
126
127
128 private java.util.Set<Thingy> shallowThingySet;
129
130
131
132
133
134
135
136
137
138
139
140 public void addDeepThingyList( Thingy thingy )
141 {
142 getDeepThingyList().add( thingy );
143 }
144
145
146
147
148
149
150 public void addDeepThingySet( Thingy thingy )
151 {
152 getDeepThingySet().add( thingy );
153 }
154
155
156
157
158
159
160 public void addShallowThingyList( Thingy thingy )
161 {
162 getShallowThingyList().add( thingy );
163 }
164
165
166
167
168
169
170 public void addShallowThingySet( Thingy thingy )
171 {
172 getShallowThingySet().add( thingy );
173 }
174
175
176
177
178
179
180
181 public void addSomeProperty( String key, String value )
182 {
183 getSomeProperties().put( key, value );
184 }
185
186
187
188
189
190
191 public void addSomeStringList( String string )
192 {
193 getSomeStringList().add( string );
194 }
195
196
197
198
199
200
201 public void addSomeStringSet( String string )
202 {
203 getSomeStringSet().add( string );
204 }
205
206
207
208
209
210
211 public Thing clone()
212 {
213 try
214 {
215 Thingf="../../../../../org/codehaus/modello/test/features/Thing.html#Thing">Thing copy = (Thing) super.clone();
216
217 if ( this.someDate != null )
218 {
219 copy.someDate = (java.util.Date) this.someDate.clone();
220 }
221
222 if ( this.someDom != null )
223 {
224 copy.someDom = new org.codehaus.plexus.util.xml.Xpp3Dom( (org.codehaus.plexus.util.xml.Xpp3Dom) this.someDom );
225 }
226
227 if ( this.someProperties != null )
228 {
229 copy.someProperties = (java.util.Properties) this.someProperties.clone();
230 }
231
232 if ( this.someStringList != null )
233 {
234 copy.someStringList = new java.util.ArrayList<String>();
235 copy.someStringList.addAll( this.someStringList );
236 }
237
238 if ( this.someStringSet != null )
239 {
240 copy.someStringSet = new java.util.HashSet<String>();
241 copy.someStringSet.addAll( this.someStringSet );
242 }
243
244 if ( this.deepThingy != null )
245 {
246 copy.deepThingy = (Thingy) this.deepThingy.clone();
247 }
248
249 if ( this.deepThingyList != null )
250 {
251 copy.deepThingyList = new java.util.ArrayList<Thingy>();
252 for ( Thingy item : this.deepThingyList )
253 {
254 copy.deepThingyList.add( ( (Thingy) item).clone() );
255 }
256 }
257
258 if ( this.deepThingySet != null )
259 {
260 copy.deepThingySet = new java.util.HashSet<Thingy>();
261 for ( Thingy item : this.deepThingySet )
262 {
263 copy.deepThingySet.add( ( (Thingy) item).clone() );
264 }
265 }
266
267 if ( this.shallowThingyList != null )
268 {
269 copy.shallowThingyList = new java.util.ArrayList<Thingy>();
270 copy.shallowThingyList.addAll( this.shallowThingyList );
271 }
272
273 if ( this.shallowThingySet != null )
274 {
275 copy.shallowThingySet = new java.util.HashSet<Thingy>();
276 copy.shallowThingySet.addAll( this.shallowThingySet );
277 }
278
279 cloneCustomFields( copy );
280
281 return copy;
282 }
283 catch ( java.lang.Exception ex )
284 {
285 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
286 + " does not support clone()" ).initCause( ex );
287 }
288 }
289
290
291
292
293
294
295 public Thingy getDeepThingy()
296 {
297 return this.deepThingy;
298 }
299
300
301
302
303
304
305 public java.util.List<Thingy> getDeepThingyList()
306 {
307 if ( this.deepThingyList == null )
308 {
309 this.deepThingyList = new java.util.ArrayList<Thingy>();
310 }
311
312 return this.deepThingyList;
313 }
314
315
316
317
318
319
320 public java.util.Set<Thingy> getDeepThingySet()
321 {
322 if ( this.deepThingySet == null )
323 {
324 this.deepThingySet = new java.util.HashSet<Thingy>();
325 }
326
327 return this.deepThingySet;
328 }
329
330
331
332
333
334
335 public Thingy getShallowThingy()
336 {
337 return this.shallowThingy;
338 }
339
340
341
342
343
344
345 public java.util.List<Thingy> getShallowThingyList()
346 {
347 if ( this.shallowThingyList == null )
348 {
349 this.shallowThingyList = new java.util.ArrayList<Thingy>();
350 }
351
352 return this.shallowThingyList;
353 }
354
355
356
357
358
359
360 public java.util.Set<Thingy> getShallowThingySet()
361 {
362 if ( this.shallowThingySet == null )
363 {
364 this.shallowThingySet = new java.util.HashSet<Thingy>();
365 }
366
367 return this.shallowThingySet;
368 }
369
370
371
372
373
374
375 public byte getSomeByte()
376 {
377 return this.someByte;
378 }
379
380
381
382
383
384
385 public char getSomeChar()
386 {
387 return this.someChar;
388 }
389
390
391
392
393
394
395 public java.util.Date getSomeDate()
396 {
397 return this.someDate;
398 }
399
400
401
402
403
404
405 public Object getSomeDom()
406 {
407 return this.someDom;
408 }
409
410
411
412
413
414
415 public double getSomeDouble()
416 {
417 return this.someDouble;
418 }
419
420
421
422
423
424
425 public float getSomeFloat()
426 {
427 return this.someFloat;
428 }
429
430
431
432
433
434
435 public int getSomeInt()
436 {
437 return this.someInt;
438 }
439
440
441
442
443
444
445 public long getSomeLong()
446 {
447 return this.someLong;
448 }
449
450
451
452
453
454
455 public java.util.Properties getSomeProperties()
456 {
457 if ( this.someProperties == null )
458 {
459 this.someProperties = new org.codehaus.modello.OrderedProperties();
460 }
461
462 return this.someProperties;
463 }
464
465
466
467
468
469
470 public short getSomeShort()
471 {
472 return this.someShort;
473 }
474
475
476
477
478
479
480 public String getSomeString()
481 {
482 return this.someString;
483 }
484
485
486
487
488
489
490 public java.util.List<String> getSomeStringList()
491 {
492 if ( this.someStringList == null )
493 {
494 this.someStringList = new java.util.ArrayList<String>();
495 }
496
497 return this.someStringList;
498 }
499
500
501
502
503
504
505 public java.util.Set<String> getSomeStringSet()
506 {
507 if ( this.someStringSet == null )
508 {
509 this.someStringSet = new java.util.HashSet<String>();
510 }
511
512 return this.someStringSet;
513 }
514
515
516
517
518
519
520 public boolean isSomeBoolean()
521 {
522 return this.someBoolean;
523 }
524
525
526
527
528
529
530 public void removeDeepThingyList( Thingy thingy )
531 {
532 getDeepThingyList().remove( thingy );
533 }
534
535
536
537
538
539
540 public void removeDeepThingySet( Thingy thingy )
541 {
542 getDeepThingySet().remove( thingy );
543 }
544
545
546
547
548
549
550 public void removeShallowThingyList( Thingy thingy )
551 {
552 getShallowThingyList().remove( thingy );
553 }
554
555
556
557
558
559
560 public void removeShallowThingySet( Thingy thingy )
561 {
562 getShallowThingySet().remove( thingy );
563 }
564
565
566
567
568
569
570 public void removeSomeStringList( String string )
571 {
572 getSomeStringList().remove( string );
573 }
574
575
576
577
578
579
580 public void removeSomeStringSet( String string )
581 {
582 getSomeStringSet().remove( string );
583 }
584
585
586
587
588
589
590 public void setDeepThingy( Thingy deepThingy )
591 {
592 this.deepThingy = deepThingy;
593 }
594
595
596
597
598
599
600 public void setDeepThingyList( java.util.List<Thingy> deepThingyList )
601 {
602 this.deepThingyList = deepThingyList;
603 }
604
605
606
607
608
609
610 public void setDeepThingySet( java.util.Set<Thingy> deepThingySet )
611 {
612 this.deepThingySet = deepThingySet;
613 }
614
615
616
617
618
619
620 public void setShallowThingy( Thingy shallowThingy )
621 {
622 this.shallowThingy = shallowThingy;
623 }
624
625
626
627
628
629
630 public void setShallowThingyList( java.util.List<Thingy> shallowThingyList )
631 {
632 this.shallowThingyList = shallowThingyList;
633 }
634
635
636
637
638
639
640 public void setShallowThingySet( java.util.Set<Thingy> shallowThingySet )
641 {
642 this.shallowThingySet = shallowThingySet;
643 }
644
645
646
647
648
649
650 public void setSomeBoolean( boolean someBoolean )
651 {
652 this.someBoolean = someBoolean;
653 }
654
655
656
657
658
659
660 public void setSomeByte( byte someByte )
661 {
662 this.someByte = someByte;
663 }
664
665
666
667
668
669
670 public void setSomeChar( char someChar )
671 {
672 this.someChar = someChar;
673 }
674
675
676
677
678
679
680 public void setSomeDate( java.util.Date someDate )
681 {
682 this.someDate = someDate;
683 }
684
685
686
687
688
689
690 public void setSomeDom( Object someDom )
691 {
692 this.someDom = someDom;
693 }
694
695
696
697
698
699
700 public void setSomeDouble( double someDouble )
701 {
702 this.someDouble = someDouble;
703 }
704
705
706
707
708
709
710 public void setSomeFloat( float someFloat )
711 {
712 this.someFloat = someFloat;
713 }
714
715
716
717
718
719
720 public void setSomeInt( int someInt )
721 {
722 this.someInt = someInt;
723 }
724
725
726
727
728
729
730 public void setSomeLong( long someLong )
731 {
732 this.someLong = someLong;
733 }
734
735
736
737
738
739
740 public void setSomeProperties( java.util.Properties someProperties )
741 {
742 this.someProperties = someProperties;
743 }
744
745
746
747
748
749
750 public void setSomeShort( short someShort )
751 {
752 this.someShort = someShort;
753 }
754
755
756
757
758
759
760 public void setSomeString( String someString )
761 {
762 this.someString = someString;
763 }
764
765
766
767
768
769
770 public void setSomeStringList( java.util.List<String> someStringList )
771 {
772 this.someStringList = someStringList;
773 }
774
775
776
777
778
779
780 public void setSomeStringSet( java.util.Set<String> someStringSet )
781 {
782 this.someStringSet = someStringSet;
783 }
784
785
786 public java.util.Properties customProperties = new java.util.Properties();
787
788 private void cloneCustomFields( Thing copy )
789 {
790 if ( this.customProperties != null )
791 {
792 copy.customProperties = (java.util.Properties) this.customProperties.clone();
793 }
794 }
795
796
797 }