????
| Current Path : /opt/ant/manual/api/org/apache/tools/ant/util/ |
| Current File : //opt/ant/manual/api/org/apache/tools/ant/util/ClasspathUtils.Delegate.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:55 CEST 2012 -->
<title>ClasspathUtils.Delegate (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="ClasspathUtils.Delegate (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/util/ClasspathUtils.html" title="class in org.apache.tools.ant.util"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/tools/ant/util/CollectionUtils.html" title="class in org.apache.tools.ant.util"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/tools/ant/util/ClasspathUtils.Delegate.html" target="_top">Frames</a></li>
<li><a href="ClasspathUtils.Delegate.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>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </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.util</div>
<h2 title="Class ClasspathUtils.Delegate" class="title">Class ClasspathUtils.Delegate</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.tools.ant.util.ClasspathUtils.Delegate</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html" title="class in org.apache.tools.ant.util">ClasspathUtils</a></dd>
</dl>
<hr>
<br>
<pre>public static class <span class="strong">ClasspathUtils.Delegate</span>
extends java.lang.Object</pre>
<div class="block">Delegate that helps out any specific ProjectComponent that needs
dynamic classloading.
<p>Ant ProjectComponents that need a to be able to dynamically load
Classes and instantiate them often expose the following ant syntax
sugar: </p>
<ul><li> nested <classpath> </li>
<li> attribute @classpathref </li>
<li> attribute @classname </li></ul>
<p> This class functions as a delegate handling the configuration
issues for this recurring pattern. Its usage pattern, as the name
suggests, is delegation rather than inheritance. </p></div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.6</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== 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><a href="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html#createClasspath()">createClasspath</a></strong>()</code>
<div class="block">Delegate method handling the <classpath> tag.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.ClassLoader</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html#getClassLoader()">getClassLoader</a></strong>()</code>
<div class="block">Finds or creates the classloader for this object.</div>
</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/util/ClasspathUtils.Delegate.html#getClassLoadId()">getClassLoadId</a></strong>()</code>
<div class="block">Computes the loaderId based on the configuration of the component.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html#getClasspath()">getClasspath</a></strong>()</code>
<div class="block">The classpath.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html#isReverseLoader()">isReverseLoader</a></strong>()</code>
<div class="block">Get the reverseLoader setting.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html#newInstance()">newInstance</a></strong>()</code>
<div class="block">Helper method obtaining a fresh instance of the class specified
in the @classname and using the specified classpath.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html#setClassname(java.lang.String)">setClassname</a></strong>(java.lang.String fcqn)</code>
<div class="block">Delegate method handling the @classname attribute.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html#setClasspath(org.apache.tools.ant.types.Path)">setClasspath</a></strong>(<a href="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</a> classpath)</code>
<div class="block">This method is a Delegate method handling the @classpath attribute.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html#setClasspathref(org.apache.tools.ant.types.Reference)">setClasspathref</a></strong>(<a href="../../../../../org/apache/tools/ant/types/Reference.html" title="class in org.apache.tools.ant.types">Reference</a> r)</code>
<div class="block">Delegate method handling the @classpathref attribute.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html#setLoaderRef(org.apache.tools.ant.types.Reference)">setLoaderRef</a></strong>(<a href="../../../../../org/apache/tools/ant/types/Reference.html" title="class in org.apache.tools.ant.types">Reference</a> r)</code>
<div class="block">Sets the loaderRef.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html#setReverseLoader(boolean)">setReverseLoader</a></strong>(boolean reverseLoader)</code>
<div class="block">Delegate method handling the @reverseLoader attribute.</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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="setClasspath(org.apache.tools.ant.types.Path)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setClasspath</h4>
<pre>public void setClasspath(<a href="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</a> classpath)</pre>
<div class="block">This method is a Delegate method handling the @classpath attribute.
<p>This attribute can set a path to add to the classpath.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>classpath</code> - the path to use for the classpath.</dd></dl>
</li>
</ul>
<a name="createClasspath()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createClasspath</h4>
<pre>public <a href="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</a> createClasspath()</pre>
<div class="block">Delegate method handling the <classpath> tag.
<p>This nested path-like structure can set a path to add to the
classpath.</p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the created path.</dd></dl>
</li>
</ul>
<a name="setClassname(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setClassname</h4>
<pre>public void setClassname(java.lang.String fcqn)</pre>
<div class="block">Delegate method handling the @classname attribute.
<p>This attribute sets the full qualified class name of the class
to load and instantiate.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>fcqn</code> - the name of the class to load.</dd></dl>
</li>
</ul>
<a name="setClasspathref(org.apache.tools.ant.types.Reference)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setClasspathref</h4>
<pre>public void setClasspathref(<a href="../../../../../org/apache/tools/ant/types/Reference.html" title="class in org.apache.tools.ant.types">Reference</a> r)</pre>
<div class="block">Delegate method handling the @classpathref attribute.
<p>This attribute can add a referenced path-like structure to the
classpath.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>r</code> - the reference to the classpath.</dd></dl>
</li>
</ul>
<a name="setReverseLoader(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setReverseLoader</h4>
<pre>public void setReverseLoader(boolean reverseLoader)</pre>
<div class="block">Delegate method handling the @reverseLoader attribute.
<p>This attribute can set a boolean indicating that the used
classloader should NOT follow the classical parent-first scheme.
</p>
<p>By default this is supposed to be false.</p>
<p>Caution: this behaviour is contradictory to the normal way
classloaders work. Do not let your ProjectComponent use it if
you are not really sure.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>reverseLoader</code> - if true reverse the order of looking up a class.</dd></dl>
</li>
</ul>
<a name="setLoaderRef(org.apache.tools.ant.types.Reference)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLoaderRef</h4>
<pre>public void setLoaderRef(<a href="../../../../../org/apache/tools/ant/types/Reference.html" title="class in org.apache.tools.ant.types">Reference</a> r)</pre>
<div class="block">Sets the loaderRef.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>r</code> - the reference to the loader.</dd></dl>
</li>
</ul>
<a name="getClassLoader()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClassLoader</h4>
<pre>public java.lang.ClassLoader getClassLoader()</pre>
<div class="block">Finds or creates the classloader for this object.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The class loader.</dd></dl>
</li>
</ul>
<a name="getClassLoadId()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClassLoadId</h4>
<pre>public java.lang.String getClassLoadId()</pre>
<div class="block">Computes the loaderId based on the configuration of the component.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>a loader identifier.</dd></dl>
</li>
</ul>
<a name="newInstance()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newInstance</h4>
<pre>public java.lang.Object newInstance()</pre>
<div class="block">Helper method obtaining a fresh instance of the class specified
in the @classname and using the specified classpath.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the fresh instantiated object.</dd></dl>
</li>
</ul>
<a name="getClasspath()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClasspath</h4>
<pre>public <a href="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</a> getClasspath()</pre>
<div class="block">The classpath.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the classpath.</dd></dl>
</li>
</ul>
<a name="isReverseLoader()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isReverseLoader</h4>
<pre>public boolean isReverseLoader()</pre>
<div class="block">Get the reverseLoader setting.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if looking up in reverse order.</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/util/ClasspathUtils.html" title="class in org.apache.tools.ant.util"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/tools/ant/util/CollectionUtils.html" title="class in org.apache.tools.ant.util"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/tools/ant/util/ClasspathUtils.Delegate.html" target="_top">Frames</a></li>
<li><a href="ClasspathUtils.Delegate.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>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>