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;

/**
* Create a reference.
* @deprecated Please use {@link Reference#Reference(Project,String)} instead.
*/
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.
*/
public Reference(String id) {
setRefId(id);
}
/**
* Create a reference to a named ID in a particular project.
* @param p the project this reference is associated with
@@ -53,14 +56,23 @@ public class Reference {
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) {
refid = id;
}

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

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


Loading…
Cancel
Save