1 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 29 public class AnnotationLocation implements Location 30 { 31 private final Resource _resource; 32 33 private final String _description; 34 35 public AnnotationLocation(Resource resource, String description) 36 { 37 Defense.notNull(resource, "resource"); 38 Defense.notNull(description, "description"); 39 40 _resource = resource; 41 _description = description; 42 } 43 44 47 48 public String toString() 49 { 50 return _description; 51 } 52 53 56 57 public Resource getResource() 58 { 59 return _resource; 60 } 61 62 65 66 public int getLineNumber() 67 { 68 return 0; 69 } 70 71 74 75 public int getColumnNumber() 76 { 77 return 0; 78 } 79 80 @Override 81 public boolean equals(Object other) 82 { 83 if (other instanceof AnnotationLocation) 84 { 85 AnnotationLocation otherLocation = (AnnotationLocation) other; 86 87 return _resource.equals(otherLocation._resource) 88 && _description.equals(otherLocation._description); 89 } 90 91 return false; 92 } 93 } 94 | Popular Tags |