org.apache.tools.ant.types
Class Reference
java.lang.Object
org.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
getProject
public Project getProject()
Get the associated project, if any; may be null.
getRefId
public String getRefId()
Get the reference id of this reference.
getReferencedObject
public Object getReferencedObject()
throws BuildException
Resolve the reference, looking in the associated project.
BuildException
- if the project is null or the reference cannot be dereferenced
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.
setProject
public void setProject(Project p)
setRefId
public void setRefId(String id)
id
- the reference id to use
Copyright B) 2000-2006 Apache Software Foundation. All Rights Reserved.