1 package net.javacoding.jspider.api.event.resource; 2 3 import net.javacoding.jspider.api.model.FetchedResource; 4 import net.javacoding.jspider.api.event.EventVisitor; 5 6 9 public class EMailAddressDiscoveredEvent extends ResourceRelatedEvent { 10 11 protected String email; 12 13 public EMailAddressDiscoveredEvent ( FetchedResource resource, String email ) { 14 super ( resource ); 15 this.email = email; 16 } 17 18 public FetchedResource getResource ( ) { 19 return (FetchedResource)resource; 20 } 21 22 public String getEmailAddress ( ) { 23 return email; 24 } 25 26 public String getComment() { 27 return "e-mail address '" + email + "' discovered"; 28 } 29 30 public void accept(EventVisitor visitor) { 31 visitor.visit(this); 32 } 33 34 public String toString ( ) { 35 return getComment(); 36 } 37 38 } 39 | Popular Tags |