Browse Source

javadoc + trailing spaces

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277353 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 20 years ago
parent
commit
7270319d7a
1 changed files with 16 additions and 5 deletions
  1. +16
    -5
      src/main/org/apache/tools/ant/types/Reference.java

+ 16
- 5
src/main/org/apache/tools/ant/types/Reference.java View File

@@ -30,18 +30,21 @@ public class Reference {
private Project project; private Project project;


/** /**
* Create a reference.
* @deprecated Please use {@link Reference#Reference(Project,String)} instead. * @deprecated Please use {@link Reference#Reference(Project,String)} instead.
*/ */
public Reference() { public Reference() {
} }


/** /**
* Create a reference to a named ID.
* @param id the name of this reference
* @deprecated Please use {@link Reference#Reference(Project,String)} instead. * @deprecated Please use {@link Reference#Reference(Project,String)} instead.
*/ */
public Reference(String id) { public Reference(String id) {
setRefId(id); setRefId(id);
} }
/** /**
* Create a reference to a named ID in a particular project. * Create a reference to a named ID in a particular project.
* @param p the project this reference is associated with * @param p the project this reference is associated with
@@ -53,14 +56,23 @@ public class Reference {
setProject(p); setProject(p);
} }


/**
* Set the reference id. Should not normally be necessary;
* use {@link Reference#Reference(Project, String)}.
* @param id the reference id to use
*/
public void setRefId(String id) { public void setRefId(String id) {
refid = id; refid = id;
} }


/**
* Get the reference id of this reference.
* @return the reference id
*/
public String getRefId() { public String getRefId() {
return refid; return refid;
} }
/** /**
* Set the associated project. Should not normally be necessary; * Set the associated project. Should not normally be necessary;
* use {@link Reference#Reference(Project,String)}. * use {@link Reference#Reference(Project,String)}.
@@ -70,7 +82,7 @@ public class Reference {
public void setProject(Project p) { public void setProject(Project p) {
this.project = p; this.project = p;
} }
/** /**
* Get the associated project, if any; may be null. * Get the associated project, if any; may be null.
* @return the associated project * @return the associated project
@@ -93,14 +105,13 @@ public class Reference {
throw new BuildException("No reference specified"); throw new BuildException("No reference specified");
} }


Object o = project == null ? fallback.getReference(refid) : project.getReference(refid); Object o = project == null ? fallback.getReference(refid) : project.getReference(refid);
if (o == null) { if (o == null) {
throw new BuildException("Reference " + refid + " not found."); throw new BuildException("Reference " + refid + " not found.");
} }
return o; return o;
} }
/** /**
* Resolve the reference, looking in the associated project. * Resolve the reference, looking in the associated project.
* @see Project#getReference * @see Project#getReference


Loading…
Cancel
Save