Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 18 package org.apache.tools.ant; 19 20 import java.util.EventObject ; 21 22 30 public class BuildEvent extends EventObject { 31 32 33 private Project project; 34 35 private Target target; 36 37 private Task task; 38 42 private String message; 43 46 private int priority = Project.MSG_VERBOSE; 47 52 private Throwable exception; 53 54 60 public BuildEvent(Project project) { 61 super(project); 62 this.project = project; 63 this.target = null; 64 this.task = null; 65 } 66 67 75 public BuildEvent(Target target) { 76 super(target); 77 this.project = target.getProject(); 78 this.target = target; 79 this.task = null; 80 } 81 82 90 public BuildEvent(Task task) { 91 super(task); 92 this.project = task.getProject(); 93 this.target = task.getOwningTarget(); 94 this.task = task; 95 } 96 97 108 public void setMessage(String message, int priority) { 109 this.message = message; 110 this.priority = priority; 111 } 112 113 126 public void setException(Throwable exception) { 127 this.exception = exception; 128 } 129 130 135 public Project getProject() { 136 return project; 137 } 138 139 145 public Target getTarget() { 146 return target; 147 } 148 149 155 public Task getTask() { 156 return task; 157 } 158 159 168 public String getMessage() { 169 return message; 170 } 171 172 181 public int getPriority() { 182 return priority; 183 } 184 185 198 public Throwable getException() { 199 return exception; 200 } 201 } 202
| Popular Tags
|