|
org.apache.tools.ant.module/3 3.27.0 2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.module.spi.AntEvent
public final class AntEvent
One event delivered to an AntLogger
.
Note that one event is shared across all listeners.
The information available from the event represents a best effort to gather information from the Ant run. Some versions of Ant may not support all of these capabilities, in which case the event method will simply return null or whatever the documented fallback value is. For example, Ant 1.5 does not permit details of task structure to be introspected, but 1.6 does.
Field Summary | |
---|---|
static int |
LOG_DEBUG
Debugging log level. |
static int |
LOG_ERR
Error log level. |
static int |
LOG_INFO
Information log level. |
static int |
LOG_VERBOSE
Verbose log level. |
static int |
LOG_WARN
Warning log level. |
Method Summary | |
---|---|
void |
consume()
Mark an event as consumed to advise other loggers not to handle it. |
String |
evaluate(String text)
Evaluate a string with possible substitutions according to defined properties. |
Throwable |
getException()
Get a terminating exception. |
int |
getLine()
Get the line number in getScriptLocation() corresponding to this event. |
int |
getLogLevel()
Get the log level of the message. |
String |
getMessage()
Get the name of the message being logged. |
String |
getProperty(String name)
Get a property set on the current Ant project. |
Set<String> |
getPropertyNames()
Get a set of property names defined on the current Ant project. |
File |
getScriptLocation()
Get the location of the Ant script producing this event. |
AntSession |
getSession()
Get the associated session. |
String |
getTargetName()
Get the name of the target in getScriptLocation() producing this event. |
String |
getTaskName()
Get the name of the task producing this event. |
TaskStructure |
getTaskStructure()
Get the configured XML structure of the task producing this event. |
boolean |
isConsumed()
Test whether this event has already been consumed by some other logger. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int LOG_ERR
public static final int LOG_WARN
public static final int LOG_INFO
public static final int LOG_VERBOSE
public static final int LOG_DEBUG
Method Detail |
---|
public AntSession getSession()
public void consume() throws IllegalStateException
IllegalStateException
- if it was already consumedpublic boolean isConsumed()
public File getScriptLocation()
public int getLine()
getScriptLocation()
corresponding to this event.
Line numbers start at one.
public String getTargetName()
getScriptLocation()
producing this event.
Some events occur outside targets and so there will be no target name.
public String getTaskName()
public TaskStructure getTaskStructure()
public String getMessage()
AntLogger.messageLogged(org.apache.tools.ant.module.spi.AntEvent)
.
public int getLogLevel()
AntLogger.messageLogged(org.apache.tools.ant.module.spi.AntEvent)
.
Note that lower numbers are higher priority.
public Throwable getException()
AntLogger.buildFinished(org.apache.tools.ant.module.spi.AntEvent)
and AntLogger.buildInitializationFailed(org.apache.tools.ant.module.spi.AntEvent)
.
public String getProperty(String name)
name
- the property name
public Set<String> getPropertyNames()
public String evaluate(String text)
text
- the text to evaluate
TaskStructure.getAttribute(java.lang.String)
,
TaskStructure.getText()
public String toString()
|
org.apache.tools.ant.module/3 3.27.0 2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |