1 // =================== DO NOT EDIT THIS FILE ====================
2 // Generated by Modello 2.1.2,
3 // any modifications will be overwritten.
4 // ==============================================================
5
6 package org.apache.maven.plugins.pmd.model;
7
8 /**
9 * Class PmdFile.
10 *
11 * @version $Revision$ $Date$
12 */
13 @SuppressWarnings( "all" )
14 public class PmdFile
15 implements java.io.Serializable
16 {
17
18 //--------------------------/
19 //- Class/Member Variables -/
20 //--------------------------/
21
22 /**
23 * Field name.
24 */
25 private String name;
26
27 /**
28 * Field violations.
29 */
30 private java.util.List<Violation> violations;
31
32
33 //-----------/
34 //- Methods -/
35 //-----------/
36
37 /**
38 * Method addViolation.
39 *
40 * @param violation a violation object.
41 */
42 public void addViolation( Violation violation )
43 {
44 getViolations().add( violation );
45 } //-- void addViolation( Violation )
46
47 /**
48 * Get the name field.
49 *
50 * @return String
51 */
52 public String getName()
53 {
54 return this.name;
55 } //-- String getName()
56
57 /**
58 * Method getViolations.
59 *
60 * @return List
61 */
62 public java.util.List<Violation> getViolations()
63 {
64 if ( this.violations == null )
65 {
66 this.violations = new java.util.ArrayList<Violation>();
67 }
68
69 return this.violations;
70 } //-- java.util.List<Violation> getViolations()
71
72 /**
73 * Method removeViolation.
74 *
75 * @param violation a violation object.
76 */
77 public void removeViolation( Violation violation )
78 {
79 getViolations().remove( violation );
80 } //-- void removeViolation( Violation )
81
82 /**
83 * Set the name field.
84 *
85 * @param name a name object.
86 */
87 public void setName( String name )
88 {
89 this.name = name;
90 } //-- void setName( String )
91
92 /**
93 * Set the violations field.
94 *
95 * @param violations a violations object.
96 */
97 public void setViolations( java.util.List<Violation> violations )
98 {
99 this.violations = violations;
100 } //-- void setViolations( java.util.List )
101
102 }