1 19 20 package org.apache.tools.ant.module.spi; 21 22 import java.io.File ; 23 import java.net.URL ; 24 import org.apache.tools.ant.module.run.LoggerTrampoline; 25 import org.openide.windows.OutputListener; 26 27 34 public final class AntSession { 35 36 static { 37 LoggerTrampoline.ANT_SESSION_CREATOR = new LoggerTrampoline.Creator() { 38 public AntSession makeAntSession(LoggerTrampoline.AntSessionImpl impl) { 39 return new AntSession(impl); 40 } 41 public AntEvent makeAntEvent(LoggerTrampoline.AntEventImpl impl) { 42 throw new AssertionError (); 43 } 44 public TaskStructure makeTaskStructure(LoggerTrampoline.TaskStructureImpl impl) { 45 throw new AssertionError (); 46 } 47 }; 48 } 49 50 private final LoggerTrampoline.AntSessionImpl impl; 51 private AntSession(LoggerTrampoline.AntSessionImpl impl) { 52 this.impl = impl; 53 } 54 55 60 public File getOriginatingScript() { 61 return impl.getOriginatingScript(); 62 } 63 64 68 public String [] getOriginatingTargets() { 69 return impl.getOriginatingTargets(); 70 } 71 72 77 public Object getCustomData(AntLogger logger) { 78 return impl.getCustomData(logger); 79 } 80 81 88 public void putCustomData(AntLogger logger, Object data) { 89 impl.putCustomData(logger, data); 90 } 91 92 99 public void println(String message, boolean err, OutputListener listener) { 100 impl.println(message, err, listener); 101 } 102 103 125 public void deliverMessageLogged(AntEvent originalEvent, String message, int level) { 126 impl.deliverMessageLogged(originalEvent, message, level); 127 } 128 129 146 public void consumeException(Throwable t) throws IllegalStateException { 147 impl.consumeException(t); 148 } 149 150 162 public boolean isExceptionConsumed(Throwable t) { 163 return impl.isExceptionConsumed(t); 164 } 165 166 171 public int getVerbosity() { 172 return impl.getVerbosity(); 173 } 174 175 179 public String getDisplayName() { 180 return impl.getDisplayName(); 181 } 182 183 200 public OutputListener createStandardHyperlink(URL file, String message, int line1, int column1, int line2, int column2) { 201 return impl.createStandardHyperlink(file, message, line1, column1, line2, column2); 202 } 203 204 @Override 205 public String toString() { 206 return impl.toString(); 207 } 208 209 } 210 | Popular Tags |