org.apache.tools.ant.types
Class Reference
java.lang.Objectorg.apache.tools.ant.types.Reference
public class Reference
extends java.lang.Object
Class to hold a reference to another object in the project.
Reference
public Reference(String id)
Please use Reference(Project,String) instead.
Create a reference to a named ID.
id - the name of this reference
Reference
public Reference(Project p,
String id) Create a reference to a named ID in a particular project.
p - the project this reference is associated withid - the name of this reference
- Ant 1.6.3
getProject
public Project getProject()
Get the associated project, if any; may be null.
- the associated project
- Ant 1.6.3
getRefId
public String getRefId()
Get the reference id of this reference.
- the reference id
getReferencedObject
public Object getReferencedObject(Project fallback)
throws BuildException Resolve the reference, using the associated project if
it set, otherwise use the passed in project.
fallback - the fallback project to use if the project attribute of
reference is not set.
- the dereferenced object.
BuildException - if the reference cannot be dereferenced.
setProject
public void setProject(Project p)
p - the project to use
- Ant 1.6.3
setRefId
public void setRefId(String id)
id - the reference id to use
Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.