1 package net.javacoding.jspider.api.event.resource; 2 3 4 import net.javacoding.jspider.api.event.EventVisitor; 5 import net.javacoding.jspider.api.event.JSpiderEvent; 6 import net.javacoding.jspider.api.model.Resource; 7 8 import java.net.URL ; 9 10 11 17 public abstract class ResourceRelatedEvent extends JSpiderEvent { 18 19 protected Resource resource; 20 21 public ResourceRelatedEvent(Resource resource) { 22 this.resource = resource; 23 } 24 25 public URL getURL() { 26 return resource.getURL(); 27 } 28 29 public void accept(EventVisitor visitor) { 30 visitor.visit(this); 31 } 32 33 public String toString() { 34 return super.toString() + " " + getComment(); 35 } 36 37 } 38 | Popular Tags |