????
| Current Path : /opt/ant/manual/api/org/apache/tools/ant/ |
| Current File : //opt/ant/manual/api/org/apache/tools/ant/Location.html |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_03) on Tue May 22 06:24:50 CEST 2012 -->
<title>Location (Apache Ant API)</title>
<meta name="date" content="2012-05-22">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Location (Apache Ant API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/tools/ant/IntrospectionHelper.Creator.html" title="class in org.apache.tools.ant"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/tools/ant/MagicNames.html" title="class in org.apache.tools.ant"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/tools/ant/Location.html" target="_top">Frames</a></li>
<li><a href="Location.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.tools.ant</div>
<h2 title="Class Location" class="title">Class Location</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.tools.ant.Location</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable</dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">Location</span>
extends java.lang.Object
implements java.io.Serializable</pre>
<div class="block">Stores the location of a piece of text within a file (file name,
line number and column number). Note that the column number is
currently ignored.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../serialized-form.html#org.apache.tools.ant.Location">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/tools/ant/Location.html" title="class in org.apache.tools.ant">Location</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/ant/Location.html#UNKNOWN_LOCATION">UNKNOWN_LOCATION</a></strong></code>
<div class="block">Location to use when one is needed but no information is available</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/tools/ant/Location.html#Location(org.xml.sax.Locator)">Location</a></strong>(org.xml.sax.Locator loc)</code>
<div class="block">Creates a location from the SAX locator using the system ID as
the filename.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/tools/ant/Location.html#Location(java.lang.String)">Location</a></strong>(java.lang.String fileName)</code>
<div class="block">Creates a location consisting of a file name but no line number or
column number.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/tools/ant/Location.html#Location(java.lang.String, int, int)">Location</a></strong>(java.lang.String fileName,
int lineNumber,
int columnNumber)</code>
<div class="block">Creates a location consisting of a file name, line number and
column number.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/ant/Location.html#equals(java.lang.Object)">equals</a></strong>(java.lang.Object other)</code>
<div class="block">Equality operation.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/ant/Location.html#getColumnNumber()">getColumnNumber</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/ant/Location.html#getFileName()">getFileName</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/ant/Location.html#getLineNumber()">getLineNumber</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/ant/Location.html#hashCode()">hashCode</a></strong>()</code>
<div class="block">Hash operation.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/ant/Location.html#toString()">toString</a></strong>()</code>
<div class="block">Returns the file name, line number, a colon and a trailing space.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="UNKNOWN_LOCATION">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>UNKNOWN_LOCATION</h4>
<pre>public static final <a href="../../../../org/apache/tools/ant/Location.html" title="class in org.apache.tools.ant">Location</a> UNKNOWN_LOCATION</pre>
<div class="block">Location to use when one is needed but no information is available</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Location(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Location</h4>
<pre>public Location(java.lang.String fileName)</pre>
<div class="block">Creates a location consisting of a file name but no line number or
column number.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>fileName</code> - The name of the file. May be <code>null</code>,
in which case the location is equivalent to
<a href="../../../../org/apache/tools/ant/Location.html#UNKNOWN_LOCATION"><code>UNKNOWN_LOCATION</code></a>.</dd></dl>
</li>
</ul>
<a name="Location(org.xml.sax.Locator)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Location</h4>
<pre>public Location(org.xml.sax.Locator loc)</pre>
<div class="block">Creates a location from the SAX locator using the system ID as
the filename.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>loc</code> - Must not be <code>null</code>.</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.6</dd></dl>
</li>
</ul>
<a name="Location(java.lang.String, int, int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Location</h4>
<pre>public Location(java.lang.String fileName,
int lineNumber,
int columnNumber)</pre>
<div class="block">Creates a location consisting of a file name, line number and
column number.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>fileName</code> - The name of the file. May be <code>null</code>,
in which case the location is equivalent to
<a href="../../../../org/apache/tools/ant/Location.html#UNKNOWN_LOCATION"><code>UNKNOWN_LOCATION</code></a>.</dd><dd><code>lineNumber</code> - Line number within the file. Use 0 for unknown
positions within a file.</dd><dd><code>columnNumber</code> - Column number within the line.</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getFileName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFileName</h4>
<pre>public java.lang.String getFileName()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the filename portion of the location</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.6</dd></dl>
</li>
</ul>
<a name="getLineNumber()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLineNumber</h4>
<pre>public int getLineNumber()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the line number</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.6</dd></dl>
</li>
</ul>
<a name="getColumnNumber()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getColumnNumber</h4>
<pre>public int getColumnNumber()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the column number</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.7</dd></dl>
</li>
</ul>
<a name="toString()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public java.lang.String toString()</pre>
<div class="block">Returns the file name, line number, a colon and a trailing space.
An error message can be appended easily. For unknown locations, an
empty string is returned.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>toString</code> in class <code>java.lang.Object</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a String of the form <code>"fileName:lineNumber: "</code>
if both file name and line number are known,
<code>"fileName: "</code> if only the file name is known,
and the empty string for unknown locations.</dd></dl>
</li>
</ul>
<a name="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public boolean equals(java.lang.Object other)</pre>
<div class="block">Equality operation.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>equals</code> in class <code>java.lang.Object</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>other</code> - the object to compare to.</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if the other object contains the same information
as this object.</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.6.3</dd></dl>
</li>
</ul>
<a name="hashCode()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>hashCode</h4>
<pre>public int hashCode()</pre>
<div class="block">Hash operation.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>hashCode</code> in class <code>java.lang.Object</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a hash code value for this location.</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.6.3</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/tools/ant/IntrospectionHelper.Creator.html" title="class in org.apache.tools.ant"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/tools/ant/MagicNames.html" title="class in org.apache.tools.ant"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/tools/ant/Location.html" target="_top">Frames</a></li>
<li><a href="Location.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>