1
2
3
4
5
6
7
8
9
10
11
12
13
14 package ch.qos.logback.core.model;
15
16 import java.util.Objects;
17
18 import ch.qos.logback.core.model.processor.PhaseIndicator;
19 import ch.qos.logback.core.model.processor.ProcessingPhase;
20
21 @PhaseIndicator(phase = ProcessingPhase.SECOND)
22 public class AppenderRefModel extends Model {
23
24 private static final long serialVersionUID = 5238705468395447547L;
25
26 String ref;
27
28 protected AppenderRefModel makeNewInstance() {
29 return new AppenderRefModel();
30 }
31
32 @Override
33 protected void mirror(Model that) {
34 AppenderRefModel actual = (AppenderRefModel) that;
35 super.mirror(actual);
36 this.ref = actual.ref;
37 }
38
39 public String getRef() {
40 return ref;
41 }
42
43 public void setRef(String ref) {
44 this.ref = ref;
45 }
46
47 @Override
48 public int hashCode() {
49 final int prime = 31;
50 int result = super.hashCode();
51 result = prime * result + Objects.hash(ref);
52 return result;
53 }
54
55 @Override
56 public boolean equals(Object obj) {
57 if (this == obj)
58 return true;
59 if (!super.equals(obj))
60 return false;
61 if (getClass() != obj.getClass())
62 return false;
63 AppenderRefModel other = (AppenderRefModel) obj;
64 return Objects.equals(ref, other.ref);
65 }
66
67
68
69 }