Browse Source

fix whichresouce manual page

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275786 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 21 years ago
parent
commit
be81cb82cd
2 changed files with 47 additions and 30 deletions
  1. +37
    -27
      docs/manual/CoreTasks/whichresource.html
  2. +10
    -3
      src/main/org/apache/tools/ant/taskdefs/WhichResource.java

+ 37
- 27
docs/manual/CoreTasks/whichresource.html View File

@@ -52,16 +52,18 @@
</table>
<!-- End Description -->

<!-- Ignore -->



<!-- Start Attributes -->
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td>&nbsp;</td></tr>

<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica.sanserif">
<a name="attributes">
<strong>Parameters</strong></a></font>
</td></tr>

<tr><td><blockquote>
<table>
<tr>
@@ -73,65 +75,75 @@
</td>
<td bgcolor="#cccccc" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Type</b></font>
</td>
<td bgcolor="#cccccc" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Requirement</b></font>
</td>
</tr>
<!-- Attribute -->
<!-- Attribute Group -->
<!-- Attribute -->
<tr>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">class</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">property</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
name the class to look for
</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">the property to fill with the URL of the resource or class</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left" rowspan="1">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Required</font>
</td>
</tr>
<!-- Attribute -->

<!-- Attribute Group -->
<!-- Attribute -->
<tr>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">classpath</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">class</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Set the classpath to be used for this compilation.
</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">name the class to look for</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Path</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left" rowspan="2">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Exactly one of these two</font>
</td>
</tr>
<!-- Attribute -->
<tr>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">property</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">resource</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
the property to fill with the URL of the resource or class
</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">name the resource to look for</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
</td>
</tr>
<!-- Attribute -->

<!-- Attribute Group -->
<!-- Attribute -->
<tr>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">resource</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">classpath</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
name the resource to look for
</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Set the classpath to be used for this compilation.</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Path</font>
</td>
<td bgcolor="#eeeeee" valign="top" align="left" rowspan="1">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Optional</font>
</td>
</tr>


</table>
</blockquote></td></tr>

@@ -158,10 +170,8 @@
</td></tr>
<tr><td><blockquote>
Adds a path to the classpath.
<short-description><![CDATA[Adds a path to the classpath.]]></short-description>
<description>
<![CDATA[Adds a path to the classpath.]]>
</description>
<!-- Ignore -->
<!-- Ignore -->

</blockquote></td></tr>
</table>


+ 10
- 3
src/main/org/apache/tools/ant/taskdefs/WhichResource.java View File

@@ -71,6 +71,8 @@ import java.net.URL;
* property="log4j.url" &gt;
* </pre>
* @author steve loughran while stuck in Enumclaw, WA, with a broken down car
* @since Ant 1.6
* @ant.attribute.group name="oneof" description="Exactly one of these two"
*/
public class WhichResource extends Task {
/**
@@ -96,6 +98,7 @@ public class WhichResource extends Task {

/**
* Set the classpath to be used for this compilation.
* @param cp the classpath to be used.
*/
public void setClasspath(Path cp) {
if (classpath == null) {
@@ -107,6 +110,7 @@ public class WhichResource extends Task {

/**
* Adds a path to the classpath.
* @return a classpath to be configured.
*/
public Path createClasspath() {
if (classpath == null) {
@@ -183,7 +187,8 @@ public class WhichResource extends Task {

/**
* name the resource to look for
* @param resource
* @param resource the name of the resource to look for.
* @ant.attribute group="oneof"
*/
public void setResource(String resource) {
this.resource = resource;
@@ -191,7 +196,8 @@ public class WhichResource extends Task {

/**
* name the class to look for
* @param classname
* @param classname the name of the class to look for.
* @ant.attribute group="oneof"
*/
public void setClass(String classname) {
this.classname = classname;
@@ -199,7 +205,8 @@ public class WhichResource extends Task {

/**
* the property to fill with the URL of the resource or class
* @param property
* @param property the property to be set.
* @ant.attribute group="required"
*/
public void setProperty(String property) {
this.property = property;


Loading…
Cancel
Save