| java.lang.Object org.apache.tools.ant.module.spi.AntEvent
AntEvent | final public class AntEvent (Code) | | 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.
author: Jesse Glick since: org.apache.tools.ant.module/3 3.12 |
Field Summary | |
final public static int | LOG_DEBUG Debugging log level. | final public static int | LOG_ERR Error log level. | final public static int | LOG_INFO Information log level. | final public static int | LOG_VERBOSE Verbose log level. | final public static int | LOG_WARN Warning log level. |
LOG_DEBUG | final public static int LOG_DEBUG(Code) | | Debugging log level.
|
LOG_ERR | final public static int LOG_ERR(Code) | | Error log level.
|
LOG_INFO | final public static int LOG_INFO(Code) | | Information log level.
|
LOG_VERBOSE | final public static int LOG_VERBOSE(Code) | | Verbose log level.
|
LOG_WARN | final public static int LOG_WARN(Code) | | Warning log level.
|
getLine | public int getLine()(Code) | | Get the line number in
AntEvent.getScriptLocation corresponding to this event.
Line numbers start at one.
the line number, or -1 if unknown |
getLogLevel | public int getLogLevel()(Code) | | Get the log level of the message.
Applies only to
AntLogger.messageLogged .
Note that lower numbers are higher priority.
the log level (e.g. LOG_INFO), or -1 if inapplicable |
getProperty | public String getProperty(String name)(Code) | | Get a property set on the current Ant project.
Parameters: name - the property name its value, or null |
getPropertyNames | public Set<String> getPropertyNames()(Code) | | Get a set of property names defined on the current Ant project.
a set of property names; may be empty but not null |
getScriptLocation | public File getScriptLocation()(Code) | | Get the location of the Ant script producing this event.
the script location, or null if unknown |
getSession | public AntSession getSession()(Code) | | Get the associated session.
the session object |
getTargetName | public String getTargetName()(Code) | | Get the name of the target in
AntEvent.getScriptLocation producing this event.
Some events occur outside targets and so there will be no target name.
the target name (never empty), or null if unknown or inapplicable |
getTaskName | public String getTaskName()(Code) | | Get the name of the task producing this event.
XXX semantics w.r.t. namespaces, taskdefs, etc.?
Some events occur outside of tasks and so there will be no name.
the task name (never empty), or null if unknown or inapplicable |
getTaskStructure | public TaskStructure getTaskStructure()(Code) | | Get the configured XML structure of the task producing this event.
Some events occur outside of tasks and so there will be no information.
the task structure, or null if unknown or inapplicable |
isConsumed | public boolean isConsumed()(Code) | | Test whether this event has already been consumed by some other logger.
true if it has already been consumed |
|
|