Ant.Referencepublic class Reference
extends java.lang.Object
| Constructor | Description |
|---|---|
Reference() |
Deprecated.
since 1.7.
|
Reference(java.lang.String id) |
Deprecated.
since 1.7.
|
Reference(Project p,
java.lang.String id) |
Create a reference to a named ID in a particular project.
|
| Modifier and Type | Method | Description |
|---|---|---|
Project |
getProject() |
Get the associated project, if any; may be null.
|
java.lang.Object |
getReferencedObject() |
Resolve the reference, looking in the associated project.
|
java.lang.Object |
getReferencedObject(Project fallback) |
Resolve the reference, using the associated project if
it set, otherwise use the passed in project.
|
java.lang.String |
getRefId() |
Get the reference id of this reference.
|
void |
setProject(Project p) |
Set the associated project.
|
void |
setRefId(java.lang.String id) |
Set the reference id.
|
@Deprecated public Reference()
Reference(Project,String)
instead.@Deprecated public Reference(java.lang.String id)
Reference(Project,String)
instead.id - the name of this referencepublic Reference(Project p, java.lang.String id)
p - the project this reference is associated withid - the name of this referencepublic void setRefId(java.lang.String id)
Reference(Project, String).id - the reference id to usepublic java.lang.String getRefId()
public void setProject(Project p)
Reference(Project,String).p - the project to usepublic Project getProject()
public java.lang.Object getReferencedObject(Project fallback) throws BuildException
fallback - the fallback project to use if the project attribute of
reference is not set.BuildException - if the reference cannot be dereferenced.public java.lang.Object getReferencedObject()
throws BuildException
BuildException - if the project is null or the reference cannot be dereferencedProject.getReference(java.lang.String)