????

Your IP : 216.73.216.152


Current Path : /opt/ant/manual/api/org/apache/tools/ant/util/
Upload File :
Current File : //opt/ant/manual/api/org/apache/tools/ant/util/ClasspathUtils.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 (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 (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/ChainedMapper.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/ClasspathUtils.Delegate.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.html" target="_top">Frames</a></li>
<li><a href="ClasspathUtils.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:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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" class="title">Class ClasspathUtils</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.tools.ant.util.ClasspathUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">ClasspathUtils</span>
extends java.lang.Object</pre>
<div class="block">Offers some helper methods on the Path structure in ant.

 <p>The basic idea behind this utility class is to use it from inside the
 different Ant objects (and user defined objects) that need classLoading
 for their operation.
 Normally those would have a setClasspathRef() {for the @classpathref}
 and/or a createClasspath() {for the nested &lt;classpath&gt;}
 Typically one would have in your Ant Task or DataType</p>

 <pre><code>
 ClasspathUtils.Delegate cpDelegate;

 public void init() {
     this.cpDelegate = ClasspathUtils.getDelegate(this);
     super.init();
 }

 public void setClasspathRef(Reference r) {
     this.cpDelegate.setClasspathRef(r);
 }

 public Path createClasspath() {
     return this.cpDelegate.createClasspath();
 }

 public void setClassname(String fqcn) {
     this.cpDelegate.setClassname(fqcn);
 }
 </code></pre>

 <p>At execution time, when you actually need the classloading
 you can just:</p>

 <pre><code>
     Object o = this.cpDelegate.newInstance();
 </code></pre></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">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html" title="class in org.apache.tools.ant.util">ClasspathUtils.Delegate</a></strong></code>
<div class="block">Delegate that helps out any specific ProjectComponent that needs
 dynamic classloading.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- =========== 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">&nbsp;</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 java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#REUSE_LOADER_REF">REUSE_LOADER_REF</a></strong></code>
<div class="block">Name of the magic property that controls classloader reuse in Ant 1.4.</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">&nbsp;</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/util/ClasspathUtils.html#ClasspathUtils()">ClasspathUtils</a></strong>()</code>&nbsp;</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">&nbsp;</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>static java.lang.ClassLoader</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String)">getClassLoaderForPath</a></strong>(<a href="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</a>&nbsp;p,
                     <a href="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</a>&nbsp;path,
                     java.lang.String&nbsp;loaderId)</code>
<div class="block">Convenience overloaded version of <a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean)"><code>getClassLoaderForPath(Project, Path, String, boolean)</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.ClassLoader</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean)">getClassLoaderForPath</a></strong>(<a href="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</a>&nbsp;p,
                     <a href="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</a>&nbsp;path,
                     java.lang.String&nbsp;loaderId,
                     boolean&nbsp;reverseLoader)</code>
<div class="block">Convenience overloaded version of <a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean, boolean)"><code>getClassLoaderForPath(Project, Path, String, boolean, boolean)</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.ClassLoader</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean, boolean)">getClassLoaderForPath</a></strong>(<a href="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</a>&nbsp;p,
                     <a href="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</a>&nbsp;path,
                     java.lang.String&nbsp;loaderId,
                     boolean&nbsp;reverseLoader,
                     boolean&nbsp;reuseLoader)</code>
<div class="block">Gets a classloader that loads classes from the classpath
 defined in the path argument.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.ClassLoader</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Reference)">getClassLoaderForPath</a></strong>(<a href="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</a>&nbsp;p,
                     <a href="../../../../../org/apache/tools/ant/types/Reference.html" title="class in org.apache.tools.ant.types">Reference</a>&nbsp;ref)</code>
<div class="block">Convenience overloaded version of <a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Reference, boolean)"><code>getClassLoaderForPath(Project, Reference, boolean)</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.ClassLoader</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Reference, boolean)">getClassLoaderForPath</a></strong>(<a href="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</a>&nbsp;p,
                     <a href="../../../../../org/apache/tools/ant/types/Reference.html" title="class in org.apache.tools.ant.types">Reference</a>&nbsp;ref,
                     boolean&nbsp;reverseLoader)</code>
<div class="block">Convenience overloaded version of <a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean)"><code>getClassLoaderForPath(Project, Path,
 String, boolean)</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html" title="class in org.apache.tools.ant.util">ClasspathUtils.Delegate</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getDelegate(org.apache.tools.ant.ProjectComponent)">getDelegate</a></strong>(<a href="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</a>&nbsp;component)</code>
<div class="block">Obtains a delegate that helps out with classic classpath configuration.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.ClassLoader</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getUniqueClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, boolean)">getUniqueClassLoaderForPath</a></strong>(<a href="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</a>&nbsp;p,
                           <a href="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</a>&nbsp;path,
                           boolean&nbsp;reverseLoader)</code>
<div class="block">Gets a fresh, different, previously unused classloader that uses the
 passed path as its classpath.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#newInstance(java.lang.String, java.lang.ClassLoader)">newInstance</a></strong>(java.lang.String&nbsp;className,
           java.lang.ClassLoader&nbsp;userDefinedLoader)</code>
<div class="block">Creates a fresh object instance of the specified classname.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#newInstance(java.lang.String, java.lang.ClassLoader, java.lang.Class)">newInstance</a></strong>(java.lang.String&nbsp;className,
           java.lang.ClassLoader&nbsp;userDefinedLoader,
           java.lang.Class&nbsp;expectedType)</code>
<div class="block">Creates a fresh object instance of the specified classname.</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&nbsp;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">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="REUSE_LOADER_REF">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>REUSE_LOADER_REF</h4>
<pre>public static final&nbsp;java.lang.String REUSE_LOADER_REF</pre>
<div class="block">Name of the magic property that controls classloader reuse in Ant 1.4.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.tools.ant.util.ClasspathUtils.REUSE_LOADER_REF">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="ClasspathUtils()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ClasspathUtils</h4>
<pre>public&nbsp;ClasspathUtils()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Reference)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClassLoaderForPath</h4>
<pre>public static&nbsp;java.lang.ClassLoader&nbsp;getClassLoaderForPath(<a href="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</a>&nbsp;p,
                                          <a href="../../../../../org/apache/tools/ant/types/Reference.html" title="class in org.apache.tools.ant.types">Reference</a>&nbsp;ref)</pre>
<div class="block">Convenience overloaded version of <a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Reference, boolean)"><code>getClassLoaderForPath(Project, Reference, boolean)</code></a>.

 <p>Assumes the logical 'false' for the reverseLoader.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - the project</dd><dd><code>ref</code> - the reference</dd>
<dt><span class="strong">Returns:</span></dt><dd>The class loader</dd></dl>
</li>
</ul>
<a name="getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Reference, boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClassLoaderForPath</h4>
<pre>public static&nbsp;java.lang.ClassLoader&nbsp;getClassLoaderForPath(<a href="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</a>&nbsp;p,
                                          <a href="../../../../../org/apache/tools/ant/types/Reference.html" title="class in org.apache.tools.ant.types">Reference</a>&nbsp;ref,
                                          boolean&nbsp;reverseLoader)</pre>
<div class="block">Convenience overloaded version of <a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean)"><code>getClassLoaderForPath(Project, Path,
 String, boolean)</code></a>.

 <p>Delegates to the other one after extracting the referenced
 Path from the Project. This checks also that the passed
 Reference is pointing to a Path all right.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - current Ant project</dd><dd><code>ref</code> - Reference to Path structure</dd><dd><code>reverseLoader</code> - if set to true this new loader will take
 precedence over its parent (which is contra the regular
 classloader behaviour)</dd>
<dt><span class="strong">Returns:</span></dt><dd>The class loader</dd></dl>
</li>
</ul>
<a name="getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClassLoaderForPath</h4>
<pre>public static&nbsp;java.lang.ClassLoader&nbsp;getClassLoaderForPath(<a href="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</a>&nbsp;p,
                                          <a href="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</a>&nbsp;path,
                                          java.lang.String&nbsp;loaderId)</pre>
<div class="block">Convenience overloaded version of <a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean)"><code>getClassLoaderForPath(Project, Path, String, boolean)</code></a>.

 <p>Assumes the logical 'false' for the reverseLoader.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - current Ant project</dd><dd><code>path</code> - the path</dd><dd><code>loaderId</code> - the loader id string</dd>
<dt><span class="strong">Returns:</span></dt><dd>The class loader</dd></dl>
</li>
</ul>
<a name="getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClassLoaderForPath</h4>
<pre>public static&nbsp;java.lang.ClassLoader&nbsp;getClassLoaderForPath(<a href="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</a>&nbsp;p,
                                          <a href="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</a>&nbsp;path,
                                          java.lang.String&nbsp;loaderId,
                                          boolean&nbsp;reverseLoader)</pre>
<div class="block">Convenience overloaded version of <a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean, boolean)"><code>getClassLoaderForPath(Project, Path, String, boolean, boolean)</code></a>.

 <p>Sets value for 'reuseLoader' to true if the magic property
 has been set.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - the project</dd><dd><code>path</code> - the path</dd><dd><code>loaderId</code> - the loader id string</dd><dd><code>reverseLoader</code> - if set to true this new loader will take
 precedence over its parent (which is contra the regular
 classloader behaviour)</dd>
<dt><span class="strong">Returns:</span></dt><dd>The class loader</dd></dl>
</li>
</ul>
<a name="getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean, boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClassLoaderForPath</h4>
<pre>public static&nbsp;java.lang.ClassLoader&nbsp;getClassLoaderForPath(<a href="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</a>&nbsp;p,
                                          <a href="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</a>&nbsp;path,
                                          java.lang.String&nbsp;loaderId,
                                          boolean&nbsp;reverseLoader,
                                          boolean&nbsp;reuseLoader)</pre>
<div class="block">Gets a classloader that loads classes from the classpath
 defined in the path argument.

 <p>Based on the setting of the magic property
 'ant.reuse.loader' this will try to reuse the previously
 created loader with that id, and of course store it there upon
 creation.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - Ant Project where the handled components are living in.</dd><dd><code>path</code> - Path object to be used as classpath for this classloader</dd><dd><code>loaderId</code> - identification for this Loader,</dd><dd><code>reverseLoader</code> - if set to true this new loader will take
                      precedence over its parent (which is contra the regular
                      classloader behaviour)</dd><dd><code>reuseLoader</code> - if true reuse the loader if it is found</dd>
<dt><span class="strong">Returns:</span></dt><dd>ClassLoader that uses the Path as its classpath.</dd></dl>
</li>
</ul>
<a name="getUniqueClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUniqueClassLoaderForPath</h4>
<pre>public static&nbsp;java.lang.ClassLoader&nbsp;getUniqueClassLoaderForPath(<a href="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</a>&nbsp;p,
                                                <a href="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</a>&nbsp;path,
                                                boolean&nbsp;reverseLoader)</pre>
<div class="block">Gets a fresh, different, previously unused classloader that uses the
 passed path as its classpath.

 <p>This method completely ignores the ant.reuse.loader magic
 property and should be used with caution.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - Ant Project where the handled components are living in.</dd><dd><code>path</code> - the classpath for this loader</dd><dd><code>reverseLoader</code> - if set to true this new loader will take
                      precedence over its parent (which is contra the regular
                      classloader behaviour)</dd>
<dt><span class="strong">Returns:</span></dt><dd>The fresh, different, previously unused class loader.</dd></dl>
</li>
</ul>
<a name="newInstance(java.lang.String, java.lang.ClassLoader)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newInstance</h4>
<pre>public static&nbsp;java.lang.Object&nbsp;newInstance(java.lang.String&nbsp;className,
                           java.lang.ClassLoader&nbsp;userDefinedLoader)</pre>
<div class="block">Creates a fresh object instance of the specified classname.

 <p> This uses the userDefinedLoader to load the specified class,
 and then makes an instance using the default no-argument constructor.
 </p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>className</code> - the full qualified class name to load.</dd><dd><code>userDefinedLoader</code> - the classloader to use.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The fresh object instance</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</a></code> - when loading or instantiation failed.</dd></dl>
</li>
</ul>
<a name="newInstance(java.lang.String, java.lang.ClassLoader, java.lang.Class)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newInstance</h4>
<pre>public static&nbsp;java.lang.Object&nbsp;newInstance(java.lang.String&nbsp;className,
                           java.lang.ClassLoader&nbsp;userDefinedLoader,
                           java.lang.Class&nbsp;expectedType)</pre>
<div class="block">Creates a fresh object instance of the specified classname.

 <p> This uses the userDefinedLoader to load the specified class,
 and then makes an instance using the default no-argument constructor.
 </p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>className</code> - the full qualified class name to load.</dd><dd><code>userDefinedLoader</code> - the classloader to use.</dd><dd><code>expectedType</code> - the Class that the result should be assignment
 compatible with. (No ClassCastException will be thrown in case
 the result of this method is casted to the expectedType)</dd>
<dt><span class="strong">Returns:</span></dt><dd>The fresh object instance</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</a></code> - when loading or instantiation failed.</dd><dt><span class="strong">Since:</span></dt>
  <dd>Ant 1.7</dd></dl>
</li>
</ul>
<a name="getDelegate(org.apache.tools.ant.ProjectComponent)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getDelegate</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html" title="class in org.apache.tools.ant.util">ClasspathUtils.Delegate</a>&nbsp;getDelegate(<a href="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</a>&nbsp;component)</pre>
<div class="block">Obtains a delegate that helps out with classic classpath configuration.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>component</code> - your projectComponent that needs the assistence</dd>
<dt><span class="strong">Returns:</span></dt><dd>the helper, delegate.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html" title="class in org.apache.tools.ant.util"><code>ClasspathUtils.Delegate</code></a></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/ChainedMapper.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/ClasspathUtils.Delegate.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.html" target="_top">Frames</a></li>
<li><a href="ClasspathUtils.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:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>