1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| package org.apache.tapestry.annotations; |
16 |
| |
17 |
| import org.apache.hivemind.Location; |
18 |
| import org.apache.hivemind.Resource; |
19 |
| import org.apache.hivemind.util.Defense; |
20 |
| |
21 |
| |
22 |
| |
23 |
| |
24 |
| |
25 |
| |
26 |
| |
27 |
| |
28 |
| |
29 |
| public class AnnotationLocation implements Location |
30 |
| { |
31 |
| private final Resource _resource; |
32 |
| |
33 |
| private final String _description; |
34 |
| |
35 |
22
| public AnnotationLocation(Resource resource, String description)
|
36 |
| { |
37 |
22
| Defense.notNull(resource, "resource");
|
38 |
22
| Defense.notNull(description, "description");
|
39 |
| |
40 |
22
| _resource = resource;
|
41 |
22
| _description = description;
|
42 |
| } |
43 |
| |
44 |
| |
45 |
| |
46 |
| |
47 |
| |
48 |
10
| public String toString()
|
49 |
| { |
50 |
10
| return _description;
|
51 |
| } |
52 |
| |
53 |
| |
54 |
| |
55 |
| |
56 |
| |
57 |
0
| public Resource getResource()
|
58 |
| { |
59 |
0
| return _resource;
|
60 |
| } |
61 |
| |
62 |
| |
63 |
| |
64 |
| |
65 |
| |
66 |
0
| public int getLineNumber()
|
67 |
| { |
68 |
0
| return 0;
|
69 |
| } |
70 |
| |
71 |
| |
72 |
| |
73 |
| |
74 |
| |
75 |
0
| public int getColumnNumber()
|
76 |
| { |
77 |
0
| return 0;
|
78 |
| } |
79 |
| |
80 |
11
| @Override
|
81 |
| public boolean equals(Object other) |
82 |
| { |
83 |
11
| if (other instanceof AnnotationLocation)
|
84 |
| { |
85 |
11
| AnnotationLocation otherLocation = (AnnotationLocation) other;
|
86 |
| |
87 |
11
| return _resource.equals(otherLocation._resource)
|
88 |
| && _description.equals(otherLocation._description); |
89 |
| } |
90 |
| |
91 |
0
| return false;
|
92 |
| } |
93 |
| } |