1
2
3
4
5
6
7
8
9
10
11
12
13
14 package ch.qos.logback.classic.spi;
15
16 import java.io.Serializable;
17
18 @Deprecated
19 public class ClassPackagingData implements Serializable {
20
21 private static final long serialVersionUID = -804643281218337001L;
22 String codeLocation;
23 String version;
24 boolean exact;
25
26 public ClassPackagingData() {
27
28 }
29
30 public ClassPackagingData(String codeLocation, String version) {
31 this.codeLocation = codeLocation;
32 this.version = version;
33 this.exact = true;
34 }
35
36 public ClassPackagingData(String classLocation, String version, boolean exact) {
37 this.codeLocation = classLocation;
38 this.version = version;
39 this.exact = exact;
40 }
41
42 public String getCodeLocation() {
43 return codeLocation;
44 }
45
46 public String getVersion() {
47 return version;
48 }
49
50 public boolean isExact() {
51 return exact;
52 }
53
54 public void setCodeLocation(String codeLocation) {
55 this.codeLocation = codeLocation;
56 }
57
58 public void setVersion(String version) {
59 this.version = version;
60 }
61
62 public void setExact(boolean exact) {
63 this.exact = exact;
64 }
65
66 @Override
67 public int hashCode() {
68 final int PRIME = 31;
69 int result = 1;
70 result = PRIME * result + ((codeLocation == null) ? 0 : codeLocation.hashCode());
71 return result;
72 }
73
74 @Override
75 public boolean equals(Object obj) {
76 if (this == obj)
77 return true;
78 if (obj == null)
79 return false;
80 if (getClass() != obj.getClass())
81 return false;
82 final ClassPackagingData other = (ClassPackagingData) obj;
83 if (codeLocation == null) {
84 if (other.codeLocation != null)
85 return false;
86 } else if (!codeLocation.equals(other.codeLocation))
87 return false;
88 if (exact != other.exact)
89 return false;
90 if (version == null) {
91 if (other.version != null)
92 return false;
93 } else if (!version.equals(other.version))
94 return false;
95 return true;
96 }
97
98 }