| @@ -578,9 +578,8 @@ public abstract class AbstractFileSet extends DataType | |||||
| * for FileSet references, which can be handled by all ArchiveFileSets. | * for FileSet references, which can be handled by all ArchiveFileSets. | ||||
| * NB! This method must be overridden in subclasses such as FileSet and DirSet | * NB! This method must be overridden in subclasses such as FileSet and DirSet | ||||
| * to distinguish between the data types. | * to distinguish between the data types. | ||||
| * @return the dereferenced object. | |||||
| * @param p the current project | * @param p the current project | ||||
| * @return the referenced FileSet | |||||
| * @return the dereferenced object. | |||||
| */ | */ | ||||
| protected AbstractFileSet getRef(Project p) { | protected AbstractFileSet getRef(Project p) { | ||||
| return getCheckedRef(AbstractFileSet.class, getDataTypeName(), p); | return getCheckedRef(AbstractFileSet.class, getDataTypeName(), p); | ||||
| @@ -102,6 +102,7 @@ public class Reference { | |||||
| /** | /** | ||||
| * Resolve the reference, using the associated project if | * Resolve the reference, using the associated project if | ||||
| * it set, otherwise use the passed in project. | * it set, otherwise use the passed in project. | ||||
| * @param <T> desired object type | |||||
| * @param fallback the fallback project to use if the project attribute of | * @param fallback the fallback project to use if the project attribute of | ||||
| * reference is not set. | * reference is not set. | ||||
| * @return the dereferenced object. | * @return the dereferenced object. | ||||
| @@ -122,6 +123,7 @@ public class Reference { | |||||
| /** | /** | ||||
| * Resolve the reference, looking in the associated project. | * Resolve the reference, looking in the associated project. | ||||
| * @see Project#getReference | * @see Project#getReference | ||||
| * @param <T> desired object type | |||||
| * @return the dereferenced object. | * @return the dereferenced object. | ||||
| * @throws BuildException if the project is null or the reference cannot be dereferenced | * @throws BuildException if the project is null or the reference cannot be dereferenced | ||||
| * @since Ant 1.6.3 | * @since Ant 1.6.3 | ||||
| @@ -449,6 +449,11 @@ public class Resource extends DataType implements Comparable<Resource>, Resource | |||||
| return Optional.ofNullable(as(clazz)); | return Optional.ofNullable(as(clazz)); | ||||
| } | } | ||||
| /** | |||||
| * Perform the check for circular references and return the | |||||
| * referenced Resource. | |||||
| * @return <code>Resource</code>. | |||||
| */ | |||||
| protected Resource getRef() { | protected Resource getRef() { | ||||
| return getCheckedRef(Resource.class); | return getCheckedRef(Resource.class); | ||||
| } | } | ||||
| @@ -364,6 +364,10 @@ public abstract class AbstractSelectorContainer extends DataType | |||||
| } | } | ||||
| } | } | ||||
| /** | |||||
| * Clone the selector container. | |||||
| * @return a deep clone of a selector container. | |||||
| */ | |||||
| public synchronized Object clone() { | public synchronized Object clone() { | ||||
| if (isReference()) { | if (isReference()) { | ||||
| return getRef().clone(); | return getRef().clone(); | ||||