From baf03a919c75822d1dcdaa7ffd460ec635b6a50f Mon Sep 17 00:00:00 2001
From: twogee
* This class is the main class of Ivy, which acts as a Facade to all services offered by Ivy:
+ *
*
* Here is one typical usage:
- *
*
* Ivy ivy = Ivy.newInstance();
* ivy.configure(new URL("ivysettings.xml"));
* ivy.resolve(new URL("ivy.xml"));
*
- *
- *
* If the methods offered by the {@link Ivy} class are not flexible enough and you want to use Ivy
* engines directly, you need to call the methods within a single {@link IvyContext} associated to
- * the {@link Ivy} instance you use.
+ * the {@link Ivy} instance you use.
+ *
* To do so, it is recommended to use the {@link #execute(org.apache.ivy.Ivy.IvyCallback)} method * like this: - * + *
*
* Ivy ivy = Ivy.newInstance();
* ivy.execute(new IvyCallback() {
@@ -111,19 +111,17 @@ import org.apache.ivy.util.MessageLoggerEngine;
* }
* });
*
- *
- *
*/
public class Ivy {
/**
* Callback used to execute a set of Ivy related methods within an {@link IvyContext}.
- *
+ *
* @see Ivy#execute(org.apache.ivy.Ivy.IvyCallback)
*/
public static interface IvyCallback {
/**
* Executes Ivy related job within an {@link IvyContext}
- *
+ *
* @param ivy
* the {@link Ivy} instance to which this callback is related
* @param context
@@ -171,7 +169,7 @@ public class Ivy {
/**
* Returns the current version of Ivy, as displayed on the console when Ivy is initialized.
- *
+ *
* @return the current version of Ivy
*/
public static String getIvyVersion() {
@@ -180,9 +178,8 @@ public class Ivy {
/**
* Returns the date at which this version of Ivy has been built.
- * - * May be empty if unknown. - * + *
May be empty if unknown.
+ * * @return the date at which this version of Ivy has been built */ public static String getIvyDate() { @@ -191,7 +188,7 @@ public class Ivy { /** * Returns the URL at which Ivy web site can be found. - * + * * @return the URL at which Ivy web site can be found */ public static String getIvyHomeURL() { @@ -218,7 +215,7 @@ public class Ivy { /** * True if this instance of Ivy has already been bound to its dependencies, false otherwise. - * + * * @see #bind() */ private boolean bound; @@ -344,7 +341,7 @@ public class Ivy { ** Alternatively you can use the {@link #pushContext()} and {@link #popContext()} methods, but * this is not recommended: - * + *
*
* Object result = null;
* pushContext();
@@ -355,9 +352,7 @@ public class Ivy {
* }
* doSomethingWithResult(result);
*
- *
- *
- *
+ *
* @param callback IvyCallback
* @return Object
*/
@@ -446,6 +441,9 @@ public class Ivy {
/**
* Configures Ivy with 1.4 compatible default settings
+ *
+ * @throws ParseException if something goes wrong
+ * @throws IOException if something goes wrong
*/
public void configureDefault14() throws ParseException, IOException {
pushContext();
@@ -594,13 +592,13 @@ public class Ivy {
/**
* Example of use: deliver(mrid, "1.5", "target/ivy/ivy-[revision].xml",
* DeliverOptions.newInstance(settings).setStatus("release").setValidate(false));
- *
+ *
* @param mrid ModuleRevisionId
* @param revision String
* @param destIvyPattern String
* @param options DeliverOptions
- * @throws IOException
- * @throws ParseException
+ * @throws IOException if something goes wrong
+ * @throws ParseException if something goes wrong
*/
public void deliver(ModuleRevisionId mrid, String revision, String destIvyPattern,
DeliverOptions options) throws IOException, ParseException {
@@ -633,6 +631,10 @@ public class Ivy {
/**
* Sorts the collection of IvyNode from the less dependent to the more dependent
+ *
+ * @param nodes Collection<IvyNode>
+ * @param options SortOptions
+ * @return List<IvyNode>
*/
public List* For instance, where you were doing: - * + * *
* Ivy ivy = new Ivy(); *- * + * * do instead: - * + * *
* Ivy14 ivy = new Ivy14(); *- * + * * And that should be enough in most cases! */ public class Ivy14 { diff --git a/src/java/org/apache/ivy/ant/AntBuildTrigger.java b/src/java/org/apache/ivy/ant/AntBuildTrigger.java index 96f38136..19503333 100644 --- a/src/java/org/apache/ivy/ant/AntBuildTrigger.java +++ b/src/java/org/apache/ivy/ant/AntBuildTrigger.java @@ -38,14 +38,14 @@ import org.apache.tools.ant.taskdefs.Property; * Triggers an ant build on an event occurrence. *
* Example of use: - * + *
*- * <ant-build-trigger event="pre-resolve-dependency" + * <ant-build-trigger event="pre-resolve-dependency" * filter="revision=latest.integration" - * antfile="/path/to/[module]/build.xml" + * antfile="/path/to/[module]/build.xml" * target="compile"/> *- * + *
* Triggers an ant build for any dependency in asked in latest.integration, just before resolving * the dependency. *
@@ -53,7 +53,7 @@ import org.apache.tools.ant.taskdefs.Property; * The onlyonce property is used to tell if the ant build should be triggered only once, or several * times in the same build. * - * + * * @see AntCallTrigger * @since 1.4 */ diff --git a/src/java/org/apache/ivy/ant/IvyAntSettings.java b/src/java/org/apache/ivy/ant/IvyAntSettings.java index 64efc9e9..9f169d60 100644 --- a/src/java/org/apache/ivy/ant/IvyAntSettings.java +++ b/src/java/org/apache/ivy/ant/IvyAntSettings.java @@ -107,7 +107,7 @@ public class IvyAntSettings extends DataType { /** * Returns the default ivy settings of this classloader. If it doesn't exist yet, a new one is * created using the given project to back the VariableContainer. - * + * * @param task * TODO add text. * @return An IvySetting instance. @@ -241,7 +241,8 @@ public class IvyAntSettings extends DataType { /** * Return the configured Ivy instance. - * + * + * @param task ProjectComponent * @return Returns the configured Ivy instance. */ public Ivy getConfiguredIvyInstance(ProjectComponent task) { @@ -336,7 +337,7 @@ public class IvyAntSettings extends DataType { /** * Set file or url to its default value - * + * * @param variableContainer IvyVariableContainer */ private void defineDefaultSettingFile(IvyVariableContainer variableContainer, diff --git a/src/java/org/apache/ivy/ant/IvyBuildList.java b/src/java/org/apache/ivy/ant/IvyBuildList.java index 55cbe748..bdc9ab92 100644 --- a/src/java/org/apache/ivy/ant/IvyBuildList.java +++ b/src/java/org/apache/ivy/ant/IvyBuildList.java @@ -352,7 +352,7 @@ public class IvyBuildList extends IvyTask { /** * Returns a collection of ModuleDescriptors that are contained in the input collection of * ModuleDescriptors and upon which the root module depends - * + * * @param mds * input collection of ModuleDescriptors * @param rootmds @@ -393,7 +393,7 @@ public class IvyBuildList extends IvyTask { * Adds the current node to the toKeep collection and then processes the each of the direct * dependencies of this node that appear in the moduleIdMap (indicating that the dependency is * part of this BuildList) - * + * * @param node * the node to be processed * @param toKeep @@ -423,7 +423,7 @@ public class IvyBuildList extends IvyTask { /** * Returns a collection of ModuleDescriptors that are contained in the input collection of * ModuleDescriptors which depends on the leaf module - * + * * @param mds * input collection of ModuleDescriptors * @param leafmds @@ -461,7 +461,7 @@ public class IvyBuildList extends IvyTask { /** * Search in the moduleIdMap modules depending on node, add them to the toKeep set and process * them recursively. - * + * * @param node * the node to be processed * @param toKeep @@ -520,6 +520,7 @@ public class IvyBuildList extends IvyTask { } /** + * @return boolean * @deprecated use {@link #getOnMissingDescriptor()} instead. */ @Deprecated @@ -528,6 +529,7 @@ public class IvyBuildList extends IvyTask { } /** + * @param skipBuildFilesWithoutIvy boolean * @deprecated use {@link #setOnMissingDescriptor(String)} instead. */ @Deprecated diff --git a/src/java/org/apache/ivy/ant/IvyPublish.java b/src/java/org/apache/ivy/ant/IvyPublish.java index 1c2921b2..97952314 100644 --- a/src/java/org/apache/ivy/ant/IvyPublish.java +++ b/src/java/org/apache/ivy/ant/IvyPublish.java @@ -98,6 +98,7 @@ public class IvyPublish extends IvyTask { } /** + * @return String * @deprecated use {@link #getSrcivypattern()} instead. */ @Deprecated @@ -106,6 +107,7 @@ public class IvyPublish extends IvyTask { } /** + * @param destivypattern String * @deprecated use {@link #setSrcivypattern(String)} instead. */ @Deprecated diff --git a/src/java/org/apache/ivy/ant/IvyResolve.java b/src/java/org/apache/ivy/ant/IvyResolve.java index 5a30ab5f..8e42f71a 100644 --- a/src/java/org/apache/ivy/ant/IvyResolve.java +++ b/src/java/org/apache/ivy/ant/IvyResolve.java @@ -193,6 +193,7 @@ public class IvyResolve extends IvyTask { } /** + * @param failureProperty String * @deprecated Use {@link #setFailureProperty(String)} instead */ @Deprecated diff --git a/src/java/org/apache/ivy/ant/IvyRetrieve.java b/src/java/org/apache/ivy/ant/IvyRetrieve.java index 20695d93..c7838277 100644 --- a/src/java/org/apache/ivy/ant/IvyRetrieve.java +++ b/src/java/org/apache/ivy/ant/IvyRetrieve.java @@ -159,6 +159,8 @@ public class IvyRetrieve extends IvyPostResolveTask { /** * Option to create symlinks instead of copying. + * + * @param symlink boolean */ public void setSymlink(boolean symlink) { this.symlink = symlink; @@ -166,6 +168,8 @@ public class IvyRetrieve extends IvyPostResolveTask { /** * Option to create symlinks in one mass action, instead of separately. + * + * @param symlinkmass boolean */ public void setSymlinkmass(boolean symlinkmass) { this.symlinkmass = symlinkmass; @@ -185,9 +189,9 @@ public class IvyRetrieve extends IvyPostResolveTask { /** * Add a mapper to convert the file names. - * + * * @param mapper - * aMapper value.
+ * a Mapper value.
*/
public void addMapper(Mapper mapper) {
if (this.mapper != null) {
@@ -198,7 +202,7 @@ public class IvyRetrieve extends IvyPostResolveTask {
/**
* Add a nested filenamemapper.
- *
+ *
* @param fileNameMapper
* the mapper to add.
*/
@@ -210,7 +214,7 @@ public class IvyRetrieve extends IvyPostResolveTask {
/**
* Returns the path of the file relative to the given base directory.
- *
+ *
* @param base
* the parent directory to which the file must be evaluated.
* @param file
diff --git a/src/java/org/apache/ivy/ant/IvyTask.java b/src/java/org/apache/ivy/ant/IvyTask.java
index 42997d98..a421447f 100644
--- a/src/java/org/apache/ivy/ant/IvyTask.java
+++ b/src/java/org/apache/ivy/ant/IvyTask.java
@@ -278,8 +278,8 @@ public abstract class IvyTask extends Task {
/**
* The real logic of task execution after project has been set in the context. MUST be
* implemented by subclasses
- *
- * @throws BuildException
+ *
+ * @throws BuildException if something goes wrong
*/
public abstract void doExecute() throws BuildException;
diff --git a/src/java/org/apache/ivy/core/IvyContext.java b/src/java/org/apache/ivy/core/IvyContext.java
index 4ff0f3b9..ab735114 100644
--- a/src/java/org/apache/ivy/core/IvyContext.java
+++ b/src/java/org/apache/ivy/core/IvyContext.java
@@ -36,7 +36,7 @@ import org.apache.ivy.util.MessageLogger;
/**
* This class represents an execution context of an Ivy action. It contains several getters to
* retrieve information, like the used Ivy instance, the cache location...
- *
+ *
* @see IvyThread
*/
public class IvyContext {
@@ -90,7 +90,7 @@ public class IvyContext {
* {@link #popContext()} should usually be called when the job for which this context has been
* pushed is finished.
*
- *
+ *
* @return the newly pushed context
*/
public static IvyContext pushNewContext() {
@@ -104,7 +104,7 @@ public class IvyContext {
* {@link #popContext()} should usually be called when the job for which this context has been
* pushed is finished.
*
- *
+ *
* @return the newly pushed context
*/
public static IvyContext pushNewCopyContext() {
@@ -115,7 +115,7 @@ public class IvyContext {
* Changes the context associated with this thread. This is especially useful when launching a
* new thread, to associate it with the same context as the initial one. Do not forget to call
* {@link #popContext()} when done.
- *
+ *
* @param context
* the new context to use in this thread.
* @return the pushed context
@@ -129,7 +129,7 @@ public class IvyContext {
* Pops one context used with this thread. This is usually called after having finished a task
* for which a call to {@link #pushNewContext()} or {@link #pushContext(IvyContext)} was done
* prior to beginning the task.
- *
+ *
* @return the popped context
*/
public static IvyContext popContext() {
@@ -144,7 +144,7 @@ public class IvyContext {
* This methods does a similar job to {@link #peek(String)}, except that it considers the whole
* context stack and not only one instance.
*
- *
+ *
* @param key
* context key for the string
* @return top object from the list (index 0) of the first context in the stack containing this
@@ -172,7 +172,7 @@ public class IvyContext {
* Then, or if no ivy method has been called, a default ivy instance is returned by this method,
* so that it never returns null.
*
- *
+ *
* @return the current ivy instance
*/
public Ivy getIvy() {
@@ -187,7 +187,7 @@ public class IvyContext {
* If you want get a default Ivy instance in case no instance if currently associated, use
* {@link #getIvy()}.
*
- *
+ *
* @return the current ivy instance, or null if there is no current ivy instance.
*/
public Ivy peekIvy() {
@@ -233,7 +233,7 @@ public class IvyContext {
/**
* Reads the first object from the list saved under given key in the context. If value under key
* represents non List object then a RuntimeException is thrown.
- *
+ *
* @param key
* context key for the string
* @return top object from the list (index 0) or null if no key or list empty
@@ -259,7 +259,7 @@ public class IvyContext {
/**
* Removes and returns first object from the list saved under given key in the context. If value
* under key represents non List object then a RuntimeException is thrown.
- *
+ *
* @param key
* context key for the string
* @return top object from the list (index 0) or null if no key or list empty
@@ -286,9 +286,11 @@ public class IvyContext {
* Removes and returns first object from the list saved under given key in the context but only
* if it equals the given expectedValue - if not a false value is returned. If value under key
* represents non List object then a RuntimeException is thrown.
- *
+ *
* @param key
* context key for the string
+ * @param expectedValue
+ * expected value of the key
* @return true if the r
*/
public boolean pop(String key, Object expectedValue) {
@@ -318,7 +320,7 @@ public class IvyContext {
* under key represents non List object then a RuntimeException is thrown. If no list exists
* under given key a new LinkedList is created. This is kept without WeakReference in opposite
* to the put() results.
- *
+ *
* @param key
* key context key for the string
* @param value
diff --git a/src/java/org/apache/ivy/core/RelativeUrlResolver.java b/src/java/org/apache/ivy/core/RelativeUrlResolver.java
index abf6f017..701c4c5a 100644
--- a/src/java/org/apache/ivy/core/RelativeUrlResolver.java
+++ b/src/java/org/apache/ivy/core/RelativeUrlResolver.java
@@ -28,19 +28,20 @@ public abstract class RelativeUrlResolver {
/**
* Resolve the url in the context of context.
- *
+ *
* @param context
* The URL of the resource containing the reference url
* @param url
* a relative or absolution url string
- * @throws MalformedURLException
+ * @return URL
+ * @throws MalformedURLException if url is wrong
*/
public abstract URL getURL(URL context, String url) throws MalformedURLException;
/**
* Resolve file or url path relatively to a context. file is considered first. If file is not
* defined, url will be considered.
- *
+ *
* @param context
* The URL of the resource containing the reference file or url
* @param file
@@ -48,7 +49,7 @@ public abstract class RelativeUrlResolver {
* @param url
* a relative or absolution url string
* @return the resulting url or null if failed and url are null.
- * @throws MalformedURLException
+ * @throws MalformedURLException if url is wrong
*/
public URL getURL(URL context, String file, String url) throws MalformedURLException {
if (file != null) {
diff --git a/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java b/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java
index 66dc5f53..7e397af0 100644
--- a/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java
+++ b/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java
@@ -22,7 +22,7 @@ import org.apache.ivy.util.Checks;
/**
* This class contains information about the origin of an artifact.
- *
+ *
* @see org.apache.ivy.plugins.resolver.BasicResolver
* @see org.apache.ivy.plugins.resolver.util.ResolvedResource
*/
@@ -31,6 +31,9 @@ public class ArtifactOrigin {
/**
* ArtifactOrigin instance used when the origin is unknown.
+ *
+ * @param artifact ditto
+ * @return ArtifactOrigin
*/
public static final ArtifactOrigin unknown(Artifact artifact) {
return new ArtifactOrigin(artifact, false, UNKNOWN);
@@ -58,7 +61,7 @@ public class ArtifactOrigin {
/**
* Create a new instance
- *
+ *
* @param artifact
* the artifact pointed by this location. Must not be null.
* @param isLocal
@@ -77,7 +80,7 @@ public class ArtifactOrigin {
/**
* Is this resource local to this host, i.e. is it on the file system?
- *
+ *
* @return boolean value indicating if the resource is local.
*/
public boolean isLocal() {
@@ -86,7 +89,7 @@ public class ArtifactOrigin {
/**
* Return the location of the resource (normally a url)
- *
+ *
* @return the location of the resource
*/
public String getLocation() {
@@ -99,7 +102,7 @@ public class ArtifactOrigin {
/**
* Return the artifact that this location is pointing at.
- *
+ *
* @return the artifact that this location is pointing at.
*/
public Artifact getArtifact() {
@@ -109,7 +112,7 @@ public class ArtifactOrigin {
/**
* The last time the resource was checked to be up to date. Maybe null if this
* information is not actually used by in some case.
- *
+ *
* @return Long timestamp
*/
public Long getLastChecked() {
diff --git a/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java b/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
index f659d879..ea017971 100644
--- a/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
+++ b/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
@@ -306,7 +306,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* True if this cache should check lastmodified date to know if ivy files are up to date.
- *
+ *
* @return boolean
*/
public boolean isCheckmodified() {
@@ -324,6 +324,8 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* True if this cache should use artifacts original location when possible, false if they should
* be copied to cache.
+ *
+ * @return boolean
*/
public boolean isUseOrigin() {
if (useOrigin == null) {
@@ -340,6 +342,9 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
* Returns a File object pointing to where the artifact can be found on the local file system.
* This is usually in the cache, but it can be directly in the repository if it is local and if
* the resolve has been done with useOrigin = true
+ *
+ * @param artifact Artifact
+ * @return File
*/
public File getArchiveFileInCache(Artifact artifact) {
ArtifactOrigin origin = getSavedArtifactOrigin(artifact);
@@ -350,6 +355,10 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
* Returns a File object pointing to where the artifact can be found on the local file system.
* This is usually in the cache, but it can be directly in the repository if it is local and if
* the resolve has been done with useOrigin = true
+ *
+ * @param artifact Artifact
+ * @param origin ArtifactOrigin
+ * @return File
*/
public File getArchiveFileInCache(Artifact artifact, ArtifactOrigin origin) {
File archive = new File(getRepositoryCacheRoot(), getArchivePathInCache(artifact, origin));
@@ -368,6 +377,11 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
* using or not the original location depending on the availability of origin information
* provided as parameter and the setting of useOrigin. If useOrigin is false, this method will
* always return the file in the cache.
+ *
+ * @param artifact Artifact
+ * @param origin ArtifactOrigin
+ * @param useOrigin boolean
+ * @return File
*/
private File getArchiveFileInCache(Artifact artifact, ArtifactOrigin origin, boolean useOrigin) {
if (useOrigin && !ArtifactOrigin.isUnknown(origin) && origin.isLocal()) {
@@ -390,7 +404,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Saves the information of which resolver was used to resolve a md, so that this info can be
* retrieve later (even after a jvm restart) by getSavedResolverName(ModuleDescriptor md)
- *
+ *
* @param md
* the module descriptor resolved
* @param name
@@ -406,7 +420,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Saves the information of which resolver was used to resolve a md, so that this info can be
* retrieve later (even after a jvm restart) by getSavedArtResolverName(ModuleDescriptor md)
- *
+ *
* @param md
* the module descriptor resolved
* @param metadataResolverName
@@ -573,7 +587,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Creates the unique prefix key that will reference the artifact within the properties.
- *
+ *
* @param artifact
* the artifact to create the unique key from. Cannot be null.
* @return the unique prefix key as a string.
@@ -588,7 +602,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Returns the key used to identify the location of the artifact.
- *
+ *
* @param artifact
* the artifact to generate the key from. Cannot be null.
* @return the key to be used to reference the artifact location.
@@ -600,7 +614,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Returns the key used to identify if the artifact is local.
- *
+ *
* @param artifact
* the artifact to generate the key from. Cannot be null.
* @return the key to be used to reference the artifact locality.
@@ -612,7 +626,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Returns the key used to identify the last time the artifact was checked to be up to date.
- *
+ *
* @param artifact
* the artifact to generate the key from. Cannot be null.
* @return the key to be used to reference the artifact's last check date.
@@ -624,7 +638,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Returns the key used to identify the existence of the remote artifact.
- *
+ *
* @param artifact
* the artifact to generate the key from. Cannot be null.
* @return the key to be used to reference the existence of the artifact.
@@ -636,7 +650,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Returns the key used to identify the original artifact.
- *
+ *
* @param artifact
* the artifact to generate the key from. Cannot be null.
* @return the key to be used to reference the original artifact.
@@ -786,7 +800,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Choose write module descriptor parser for a given moduleDescriptor
- *
+ *
* @param moduleDescriptorFile
* a given module descriptor
* @return ModuleDescriptorParser
@@ -1153,7 +1167,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Compute a SHA1 of the resource name, encoded in base64, so we can use it as a file name.
- *
+ *
* @param resource
* the resource which name will be hashed
* @return the hash
@@ -1169,7 +1183,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Check that a cached file can be considered up to date and thus not downloaded
- *
+ *
* @param archiveFile
* the file in the cache
* @param resource
diff --git a/src/java/org/apache/ivy/core/check/CheckEngine.java b/src/java/org/apache/ivy/core/check/CheckEngine.java
index 34d63231..8f85f4ba 100644
--- a/src/java/org/apache/ivy/core/check/CheckEngine.java
+++ b/src/java/org/apache/ivy/core/check/CheckEngine.java
@@ -52,6 +52,10 @@ public class CheckEngine {
* are available in the corresponding resolver. Note that the check is not performed
* recursively, i.e. if a dependency has itself dependencies badly described or not available,
* this check will not discover it.
+ *
+ * @param ivyFile URL
+ * @param resolvername String
+ * @return boolean
*/
public boolean check(URL ivyFile, String resolvername) {
try {
diff --git a/src/java/org/apache/ivy/core/deliver/DeliverEngine.java b/src/java/org/apache/ivy/core/deliver/DeliverEngine.java
index 05ac1c7f..11a843ad 100644
--- a/src/java/org/apache/ivy/core/deliver/DeliverEngine.java
+++ b/src/java/org/apache/ivy/core/deliver/DeliverEngine.java
@@ -53,13 +53,15 @@ public class DeliverEngine {
* Delivers a resolved ivy file based upon last resolve call status. If resolve report file
* cannot be found in cache, then it throws an IllegalStateException (maybe resolve has not been
* called before ?).
- *
+ *
* @param revision
* the revision to which the module should be delivered
* @param destIvyPattern
* the pattern to which the delivered ivy file should be written
* @param options
* the options with which deliver should be done
+ * @throws IOException if something goes wrong
+ * @throws ParseException if something goes wrong
*/
public void deliver(String revision, String destIvyPattern, DeliverOptions options)
throws IOException, ParseException {
@@ -86,7 +88,7 @@ public class DeliverEngine {
* Delivers a resolved ivy file based upon last resolve call status. If resolve report file
* cannot be found in cache, then it throws an IllegalStateException (maybe resolve has not been
* called before ?).
- *
+ *
* @param mrid
* the module revision id of the module to deliver
* @param revision
@@ -95,6 +97,8 @@ public class DeliverEngine {
* the pattern to which the delivered ivy file should be written
* @param options
* the options with which deliver should be done
+ * @throws IOException if something goes wrong
+ * @throws ParseException if something goes wrong
*/
public void deliver(ModuleRevisionId mrid, String revision, String destIvyPattern,
DeliverOptions options) throws IOException, ParseException {
diff --git a/src/java/org/apache/ivy/core/deliver/DeliverOptions.java b/src/java/org/apache/ivy/core/deliver/DeliverOptions.java
index 6577b7a9..05b70d5e 100644
--- a/src/java/org/apache/ivy/core/deliver/DeliverOptions.java
+++ b/src/java/org/apache/ivy/core/deliver/DeliverOptions.java
@@ -55,7 +55,7 @@ public class DeliverOptions {
/**
* Returns an instance of DeliverOptions with options corresponding to default values taken from
* the given settings.
- *
+ *
* @param settings
* The settings to use to get default option values
* @return a DeliverOptions instance ready to be used or customized
@@ -74,6 +74,12 @@ public class DeliverOptions {
/**
* Creates an instance of DeliverOptions with all options explicitly set.
+ * @param status String
+ * @param pubDate Date
+ * @param pdrResolver PublishingDependencyRevisionResolver
+ * @param validate boolean
+ * @param resolveDynamicRevisions boolean
+ * @param confs String[]
*/
public DeliverOptions(String status, Date pubDate,
PublishingDependencyRevisionResolver pdrResolver, boolean validate,
@@ -93,7 +99,7 @@ public class DeliverOptions {
* PublishingDependencyRevisionResolver can then do the delivering work for the dependency and
* return the new (delivered) dependency info (with the delivered revision). Note that
* PublishingDependencyRevisionResolver is only called for each direct dependency.
- *
+ *
* @return the pdrResolver that will be used during deliver
*/
public PublishingDependencyRevisionResolver getPdrResolver() {
@@ -107,7 +113,8 @@ public class DeliverOptions {
* PublishingDependencyRevisionResolver can then do the delivering work for the dependency and
* return the new (delivered) dependency info (with the delivered revision). Note that
* PublishingDependencyRevisionResolver is only called for each direct dependency.
- *
+ *
+ * @param pdrResolver PublishingDependencyRevisionResolver
* @return the instance of DeliverOptions on which the method has been called, for easy method
* chaining
*/
@@ -155,7 +162,7 @@ public class DeliverOptions {
/**
* Returns the status to which the module should be delivered, or null if the current status
* should be kept.
- *
+ *
* @return the status to which the module should be delivered
*/
public String getStatus() {
@@ -165,7 +172,8 @@ public class DeliverOptions {
/**
* Sets the status to which the module should be delivered, use null if the current status
* should be kept.
- *
+ *
+ * @param status String
* @return the instance of DeliverOptions on which the method has been called, for easy method
* chaining
*/
@@ -176,7 +184,7 @@ public class DeliverOptions {
/**
* Returns the id of a previous resolve to use for delivering.
- *
+ *
* @return the id of a previous resolve
*/
public String getResolveId() {
@@ -185,7 +193,7 @@ public class DeliverOptions {
/**
* Sets the id of a previous resolve to use for delivering.
- *
+ *
* @param resolveId
* the id of a previous resolve
* @return the instance of DeliverOptions on which the method has been called, for easy method
@@ -199,7 +207,7 @@ public class DeliverOptions {
/**
* Return the configurations which must be delivered. Returns null if all configurations
* has to be delivered. Attention: the returned array can contain wildcards!
- *
+ *
* @return the configurations to deliver
*/
public String[] getConfs() {
@@ -208,7 +216,7 @@ public class DeliverOptions {
/**
* Sets the configurations to deliver.
- *
+ *
* @param confs
* the configurations to deliver
* @return the instance of DeliverOptions on which the method has been called, for easy method
@@ -222,7 +230,7 @@ public class DeliverOptions {
/**
* Returns the branch with which the Ivy file should be delivered, or null if
* branch info shouldn't be changed.
- *
+ *
* @return the branch with which the Ivy file should be delivered
*/
public String getPubBranch() {
@@ -231,7 +239,7 @@ public class DeliverOptions {
/**
* Sets the branch with which the Ivy file should be delivered.
- *
+ *
* @param pubBranch
* the branch with which the Ivy file should be delivered
* @return the instance of DeliverOptions on which the method has been called, for easy method
@@ -264,7 +272,6 @@ public class DeliverOptions {
return "status=" + status + " pubdate=" + pubdate + " validate=" + validate
+ " resolveDynamicRevisions=" + resolveDynamicRevisions + " merge=" + merge
+ " resolveId=" + resolveId + " pubBranch=" + pubBranch;
-
}
}
diff --git a/src/java/org/apache/ivy/core/event/IvyEvent.java b/src/java/org/apache/ivy/core/event/IvyEvent.java
index 18697a02..02ab78e4 100644
--- a/src/java/org/apache/ivy/core/event/IvyEvent.java
+++ b/src/java/org/apache/ivy/core/event/IvyEvent.java
@@ -27,15 +27,19 @@ import org.apache.ivy.core.module.id.ModuleRevisionId;
import org.apache.ivy.util.StringUtils;
/**
+ *
* The root of all ivy events Any ivy event knows which ivy instance triggered the event (the
* source) and also has a name and a map of attributes. The name of the event represents the event
* type, usually there is a one - one mapping between event names and IvyEvent subclass, even if
- * this is not mandatory. Example: pre-resolve pre-resolve-dependency post-download The map of
- * attributes is a Map from String keys to String values. It is especially useful to filter events,
- * and to get some of their essential data in some context where access to Java types is not easy
- * (in an ant build file, for example), Example: pre-resolve (organisation=foo, module=bar,
- * revision=1.0, conf=default) post-download (organisation=foo, module=bar, revision=1.0,
- * artifact=foo-test, type=jar, ext=jar)
+ * this is not mandatory. Example: pre-resolve pre-resolve-dependency post-download
+ *
+ * The map of attributes is a Map from String keys to String values. It is especially useful to
+ * filter events, and to get some of their essential data in some context where access to Java types
+ * is not easy (in an Ant build file, for example), Example: pre-resolve (organisation=foo,
+ * module=bar, revision=1.0, conf=default) post-download (organisation=foo, module=bar,
+ * revision=1.0, artifact=foo-test, type=jar, ext=jar)
+ *
| expression | *effect | @@ -60,10 +61,10 @@ import org.apache.ivy.util.filter.OrFilter; *
AND OR NOT = This means that
+ * artifact=foo AND ext=zip OR type=src will match event with artifact matching foo AND
+ * (ext matching zip OR type matching src)
+ *
* @since 1.4
*/
public class IvyEventFilter implements Filter {
diff --git a/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
index 00fdea8f..10ec6846 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
@@ -57,7 +57,7 @@ public class DefaultDependencyDescriptor implements DependencyDescriptor {
* descriptor in the system namespace. Note that exclude rules are not converted in system
* namespace, because they aren't transformable (the name space hasn't the ability to convert
* regular expressions). However, method doesExclude will work with system artifacts.
- *
+ *
* @param dd DependencyDescriptor
* @param ns Namespace
* @return DependencyDescriptor
@@ -76,9 +76,10 @@ public class DefaultDependencyDescriptor implements DependencyDescriptor {
* Transforms a dependency descriptor using the given transformer. Note that no namespace info
* will be attached to the transformed dependency descriptor, so calling doesExclude is not
* recommended (doesExclude only works when namespace is properly set)
- *
+ *
* @param dd DependencyDescriptor
* @param t NamespaceTransformer
+ * @param fromSystem boolean
* @return DefaultDependencyDescriptor
*/
public static DefaultDependencyDescriptor transformInstance(DependencyDescriptor dd,
@@ -252,6 +253,7 @@ public class DefaultDependencyDescriptor implements DependencyDescriptor {
* extending one). Both moduleConfiguration and requestedConfiguration are configurations of the
* caller, the array returned is composed of the required configurations of the dependency
* described by this descriptor.
+ *
*/
public String[] getDependencyConfigurations(String moduleConfiguration,
String requestedConfiguration) {
@@ -288,16 +290,22 @@ public class DefaultDependencyDescriptor implements DependencyDescriptor {
* we do not handle special confs like *!sg or [cond]* in right hand
* confs yet: it would require supporting parenthesis grouping in
* configurations intersection interpretation
- *
- * for (Iterator it2 = depConfs.iterator(); it2.hasNext();) { String
- * depConf = (String) it2.next(); if (depConf.startsWith("*")) { if
- * (intersectedDepConf .indexOf("(" + depConf + ")") != -1) {
- * intersectedDepConfs.add(intersectedDepConf); } else {
- * intersectedDepConfs.add( "(" + intersectedDepConf + ")+(" +
- * depConf + ")"); } } else if (intersectedDepConf.startsWith("*"))
- * { if (depConf .indexOf("(" + intersectedDepConf + ")") != -1) {
- * intersectedDepConfs.add(depConf); } else {
- * intersectedDepConfs.add( depConf + "+" + intersectedDepConf); } }
+ *
+ * for (Iterator it2 = depConfs.iterator(); it2.hasNext();) {
+ * String depConf = (String) it2.next();
+ * if (depConf.startsWith("*")) {
+ * if (intersectedDepConf .indexOf("(" + depConf + ")") != -1) {
+ * intersectedDepConfs.add(intersectedDepConf);
+ * } else {
+ * intersectedDepConfs.add( "(" + intersectedDepConf + ")+(" + depConf + ")");
+ * }
+ * } else if (intersectedDepConf.startsWith("*")) {
+ * if (depConf .indexOf("(" + intersectedDepConf + ")") != -1) {
+ * intersectedDepConfs.add(depConf);
+ * } else {
+ * intersectedDepConfs.add( depConf + "+" + intersectedDepConf);
+ * }
+ * }
* }
*/
}
@@ -406,7 +414,7 @@ public class DefaultDependencyDescriptor implements DependencyDescriptor {
/**
* Replaces fallback patterns with correct values if fallback pattern exists.
- *
+ *
* @param pattern
* pattern to look for
* @param conf
@@ -607,7 +615,7 @@ public class DefaultDependencyDescriptor implements DependencyDescriptor {
}
/**
- *
+ *
* @return true if this descriptor contains any exclusion rule
*/
public boolean canExclude() {
diff --git a/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
index 1c039b65..b286bc2a 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
@@ -133,7 +133,7 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
* descriptor in the system namespace. Note that dependency exclude rules are not converted
* in system namespace, because they aren't transformable (the name space hasn't the ability to
* convert regular expressions)
- *
+ *
* @param md ModuleDescriptor
* @param ns Namespace
* @return ModuleDescriptor
@@ -280,6 +280,9 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
/**
* IMPORTANT : at least call setModuleRevisionId and setResolvedPublicationDate with instances
* created by this constructor !
+ *
+ * @param parser ModuleDescriptorParser
+ * @param res Resource
*/
public DefaultModuleDescriptor(ModuleDescriptorParser parser, Resource res) {
this.parser = parser;
@@ -361,7 +364,7 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
/**
* Artifact configurations are not used since added artifact may not be entirely completed, so
* its configurations data may not be accurate
- *
+ *
* @param conf ditto
* @param artifact ditto
*/
@@ -427,6 +430,8 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
/**
* Returns the configuration object with the given name in the current module descriptor, null
* if not found.
+ *
+ * @param confName String
*/
public Configuration getConfiguration(String confName) {
Configuration configuration = configurations.get(confName);
@@ -599,7 +604,7 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
/**
* regular expressions as explained in Pattern class may be used in ModuleId organisation and
* name
- *
+ *
* @param moduleId ditto
* @param matcher PatternMatcher
* @param manager ConflictManager
@@ -681,7 +686,7 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
}
/**
- * Throws an exception if the module descriptor is inconsistent For the moment, only extended
+ * Throws an exception if the module descriptor is inconsistent. For the moment, only extended
* configurations existence and cycles are checked
*/
public void check() {
@@ -781,8 +786,12 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
}
/**
- * only works when namespace is properly set. The behaviour is not specified if namespace is not
- * set
+ * Only works when namespace is properly set. The behaviour is not specified if namespace is
+ * not set.
+ *
+ * @param moduleConfigurations String[]
+ * @param artifactId ditto
+ * @return boolean
*/
public boolean doesExclude(String[] moduleConfigurations, ArtifactId artifactId) {
if (namespace != null) {
diff --git a/src/java/org/apache/ivy/core/module/descriptor/DependencyArtifactDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/DependencyArtifactDescriptor.java
index 1ea78da4..f20080fb 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/DependencyArtifactDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/DependencyArtifactDescriptor.java
@@ -27,44 +27,32 @@ import org.apache.ivy.util.extendable.ExtendableItem;
*/
public interface DependencyArtifactDescriptor extends ExtendableItem {
/**
- * Returns the dependency descriptor in which this dependency artifact descriptor is declared.
- *
* @return the dependency descriptor in which this dependency artifact descriptor is declared.
*/
public DependencyDescriptor getDependencyDescriptor();
/**
- * Returns the name of the artifact asked
- *
- * @return
+ * @return the name of the artifact asked
*/
public String getName();
/**
- * Returns the type of the artifact asked
- *
- * @return
+ * @return the type of the artifact asked
*/
public String getType();
/**
- * Returns the ext of the artifact asked
- *
- * @return
+ * @return the ext of the artifact asked
*/
public String getExt();
/**
- * Returns the url to look this artifact at
- *
- * @return
+ * @return the url to look this artifact up at
*/
public URL getUrl();
/**
- * Returns the configurations of the module in which the artifact is asked
- *
- * @return an array of configuration names in which the artifact is asked
+ * @return an array of configuration names of the module in which the artifact is asked
*/
public String[] getConfigurations();
}
diff --git a/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java
index 13973d8b..880c0e32 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java
@@ -34,11 +34,11 @@ import org.apache.ivy.util.extendable.ExtendableItem;
*
*
* Then there is the dynamic constraint, which can either be the same as the default constraint, or
- * the original dependency constraint when an Ivy file is delivered an published to a repository.
- * This dynamic constraint is returned by {@link #getDynamicConstraintDependencyRevisionId()}, and
- * corresponds to the revconstraint attribute in the Ivy file. In some resolve mode,
- * this constraint can be used instead of the default dependency constraint when performing
- * dependency resolution.
+ * the original dependency constraint when an Ivy file is delivered an published to a
+ * repository. This dynamic constraint is returned by
+ * {@link #getDynamicConstraintDependencyRevisionId()}, and corresponds to the
+ * revconstraint attribute in the Ivy file. In some resolve mode, this constraint can
+ * be used instead of the default dependency constraint when performing dependency resolution.
*
info, description, configurations,
* dependencies, and/or all. Ivy extensions may add support for
* additional extends types.
+ *
+ * @return String[]
*/
public String[] getExtendsTypes();
- /** @return true if the all extend type is specified, implying all other types */
+ /**
+ * @return true if the all extend type is specified, implying all other types
+ */
public boolean isAllInherited();
- /** @return true if parent info attributes are inherited (organisation, branch, revision, etc) */
+ /**
+ * @return true if parent info attributes are inherited (organisation, branch, revision, etc)
+ */
public boolean isInfoInherited();
- /** @return true if parent description is inherited */
+ /**
+ * @return true if parent description is inherited
+ */
public boolean isDescriptionInherited();
- /** @return true if parent configurations are inherited */
+ /**
+ * @return true if parent configurations are inherited
+ */
public boolean areConfigurationsInherited();
- /** @return true if parent dependencies are inherited */
+ /**
+ * @return true if parent dependencies are inherited
+ */
public boolean areDependenciesInherited();
public boolean isLocal();
diff --git a/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
index 1116d883..6b4a2a0f 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
@@ -46,35 +46,31 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
public static final String CALLER_ALL_CONFIGURATION = "all";
/**
- * Returns true if this descriptor is a default one, i.e. one generated for a module not
- * actually having one.
- *
- * @return boolean
+ * @return true if this descriptor is a default one, i.e. one generated for a module not
+ * actually having one.
*/
boolean isDefault();
ModuleRevisionId getModuleRevisionId();
/**
- * The module revision id returned here is the resolved one, i.e. it is never a latest one. If
- * the revision has not been resolved, a null revision should be returned by getRevision() of
- * the returned ModuleRevisionId. This revision must be the same as the module descriptor
- * resolved revision id unless no module descriptor is defined
- *
- * @return ModuleRevisionId
+ * @return the resolved module revision id; it is never the latest one. If the revision has not
+ * been resolved, a null revision should be returned by getRevision() of the returned
+ * ModuleRevisionId. This revision must be the same as the module descriptor resolved
+ * revision id unless no module descriptor is defined
*/
ModuleRevisionId getResolvedModuleRevisionId();
/**
- * This method update the resolved module revision id
+ * This method updates the resolved module revision id
*
* @param revId ModuleRevisionId
*/
void setResolvedModuleRevisionId(ModuleRevisionId revId);
/**
- * Get the list of parent descriptors imported via an <extends> element. Only directly
- * imported descriptors are included; the parent's parents are not included.
+ * @return the list of parent descriptors imported via an <extends> element. Only directly
+ * imported descriptors are included; the parent's parents are not included.
*/
ExtendsDescriptor[] getInheritedDescriptors();
@@ -88,9 +84,7 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
String getStatus();
/**
- * May be null if unknown in the descriptor itself.
- *
- * @return The publication date or null when not known.
+ * @return the publication date or null when not known in the descriptor itself.
*/
Date getPublicationDate();
@@ -98,14 +92,14 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
* The publication date of the module revision should be the date at which it has been
* published, i.e. in general the date of any of its published artifacts, since all published
* artifact of a module should follow the same publishing cycle.
+ *
+ * @return Date
*/
Date getResolvedPublicationDate();
/**
- * Returns all the configurations declared by this module as an array. This array is never empty
- * (a 'default' conf is assumed when none is declared in the ivy file)
- *
- * @return all the configurations declared by this module as an array.
+ * @return all the configurations declared by this module as an array. This array is never empty
+ * (a 'default' conf is assumed when none is declared in the ivy file).
*/
Configuration[] getConfigurations();
@@ -116,27 +110,23 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
Artifact[] getArtifacts(String conf);
/**
- * Returns all artifacts of this module, excluding the artifact corresponding to the module
- * descriptor.
- *
- * @return all published artifacts of this module
+ * @return all published artifacts of this module, excluding the artifact corresponding to the
+ * module descriptor.
* @see #getMetadataArtifact()
*/
Artifact[] getAllArtifacts();
/**
- * @return The dependencies of the module. If there is no dependencies return an empty array (non
- * null)
+ * @return The dependencies of the module. If there are no dependencies return an empty array
+ * (non null)
*/
DependencyDescriptor[] getDependencies();
/**
- * Returns true if the module described by this descriptor depends directly upon the given
- * module descriptor
- *
* @param matcher VersionMatcher
* @param md ModuleDescriptor
- * @return boolean
+ * @return true if the module described by this descriptor depends directly upon the given
+ * module descriptor
*/
boolean dependsOn(VersionMatcher matcher, ModuleDescriptor md);
@@ -147,18 +137,14 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
Configuration getConfiguration(String confName);
/**
- * Returns the conflict manager to use for the given ModuleId, or null if no
- * specific conflict manager is associated with the given module id in this module descriptor.
- *
* @param id ModuleId
- * @return ConflictManager
+ * @return the conflict manager to use for the given ModuleId, or null if no specific conflict
+ * manager is associated with the given module id in this module descriptor.
*/
ConflictManager getConflictManager(ModuleId id);
/**
- * Returns the licenses of the module described by this descriptor
- *
- * @return License[]
+ * @return the licenses of the module described by this descriptor
*/
License[] getLicenses();
@@ -175,92 +161,69 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
*
* @param ivyFile
* the destination ivy file
+ * @throws ParseException if something goes wrong
+ * @throws IOException if something goes wrong
*/
void toIvyFile(File ivyFile) throws ParseException, IOException;
/**
- * The ModuleDescriptorParser used to parse this module descriptor, null is no parser was used.
- *
- * @return ModuleDescriptorParser
+ * @return the ModuleDescriptorParser used to parse this module descriptor, null is no parser was used.
*/
ModuleDescriptorParser getParser();
/**
- * The resource being the source of this module descriptor, null if no resource corresponds to
- * this module descriptor
- *
- * @return Resource
+ * @return the resource being the source of this module descriptor, null if no resource
+ * corresponds to this module descriptor.
*/
Resource getResource();
/**
- * Returns the Artifact representing this module descriptor itself.
- * * Even though the module descriptor is never described as a published artifact of a module in * the module descriptor itself, it is often useful to consider it as any other artifact of the * module. This method allows to access to the Artifact object representing this module * descriptor for this purpose. - *
* * @return the Artifact representing this module descriptor itself. */ Artifact getMetadataArtifact(); /** - * Returns true if this descriptor contains any exclusion rule - * - * @return true if this descriptor contains any exclusion rule + * @return true if this descriptor contains any exclusion rule. */ boolean canExclude(); /** - * Returns true if an exclude rule of this module attached to any of the given configurations - * matches the given artifact id, and thus exclude it - * * @param moduleConfs String[] * @param artifactId ditto - * @return boolean + * @return true if an exclude rule of this module attached to any of the given configurations + * matches the given artifact id, and thus exclude it */ boolean doesExclude(String[] moduleConfs, ArtifactId artifactId); /** - * Returns an array of all the exclude rules this module descriptor currently holds. Module - * Descriptor exclude rules are used to exclude (usually transitive) dependencies for the whole - * module. + * Module Descriptor exclude rules are used to exclude (usually transitive) dependencies for the + * whole module. * - * @return an array of {@link ExcludeRule} this module descriptor holds + * @return an array of all {@link ExcludeRule} this module descriptor currently holds. */ public ExcludeRule[] getAllExcludeRules(); /** - * Returns all the dependency descriptor mediators used by this {@link ModuleDescriptor}, as an - * instance of {@link ModuleRules}. - *- * All rules in the {@link ModuleRules} object returned are {@link DependencyDescriptorMediator} - * . - *
- * - * @return all the dependency descriptor mediators used by this {@link ModuleDescriptor}. + * @return all the {@link DependencyDescriptorMediator}s used by this + * {@link ModuleDescriptor}, as an instance of {@link ModuleRules}. */ public ModuleRules/*
- * The returned list is never null, it is empty when no extra attribute is used or
- * if extra attributes are used without xml namespaces
- *
- *
* The lookup doesn't target to speed up lookup for non exact pattern matcher. All non exact * matchers are placed in non-keyed collection. - **
+ ** At lookup for matchers against specific module, all non exact pattern matchers are iterated to * match with module attributes, and exact pattern matchers binding to the same key will also * iterated to match with module attributes. - *
*
+ ** If there are much more exact pattern matchers than non exact pattern matchers, the matcher lookup * speed can benefit from this class significantly. A quick example could be user declares lots of * dependencyOverrides which are typically exact pattern matchers. - *
*
+ ** If there are balanced exact and non exact pattern matchers, the matcher lookup speed doesn't hurt * by this class. - *
*
*/ public class MatcherLookup { @@ -65,12 +63,12 @@ public class MatcherLookup { /** * Add matcher. - * + * * If matcher is exact pattern matcher, it will be associated with a key and placed in keyed * collection. - * + * * If matcher is not exact pattern matcher, it will be placed into non-keyed collection - * + * * @param matcher MapMatcher */ public void add(MapMatcher matcher) { @@ -88,12 +86,10 @@ public class MatcherLookup { } /** - * Get a list of matchers which can apply to module with specified attributes - * * @param attrs * A map of attributes that matcher should match. - * - * @return list A list of candidate matchers that matches specified attributes + * + * @return a list of matchers that can apply to module withs specified attributes */ public List* This function use the report file found in the cache. So the function must be called before - * the new report is serialized there. This function also use the internal dependencies - * that must already be filled. This function might be 'heavy' because it may have to parse the - * previous report. + * the new report is serialized there. + *
+ *+ * This function also use the internal dependencies that must already be filled. This function + * might be 'heavy' because it may have to parse the previous report. + *
*/ public void checkIfChanged() { ResolutionCacheManager cache = resolveEngine.getSettings().getResolutionCacheManager(); @@ -109,6 +113,7 @@ public class ConfigurationResolveReport { /** * @pre checkIfChanged has been called. + * @return boolean */ public boolean hasChanged() { return hasChanged; @@ -117,7 +122,7 @@ public class ConfigurationResolveReport { /** * Returns all non evicted and non error dependency mrids The returned set is ordered so that a * dependency will always be found before their own dependencies - * + * * @return all non evicted and non error dependency mrids */ public Setnull
*/
public ArtifactDownloadReport[] getAllArtifactsReports() {
@@ -288,7 +293,7 @@ public class ConfigurationResolveReport {
/**
* Get the report on the download requests. The list of download report can be restricted to a
* specific download status, and also remove the download report for the evicted modules.
- *
+ *
* @param downloadStatus
* the status of download to retrieve. Set it to null for no restriction
* on the download status
@@ -321,7 +326,7 @@ public class ConfigurationResolveReport {
/**
* Get the report on the successful download requests with the evicted modules
- *
+ *
* @return the list of reports, never null
*/
public ArtifactDownloadReport[] getDownloadedArtifactsReports() {
@@ -330,7 +335,7 @@ public class ConfigurationResolveReport {
/**
* Get the report on the failed download requests with the evicted modules
- *
+ *
* @return the list of reports, never null
*/
public ArtifactDownloadReport[] getFailedArtifactsReports() {
diff --git a/src/java/org/apache/ivy/core/report/DownloadStatus.java b/src/java/org/apache/ivy/core/report/DownloadStatus.java
index f0364c26..db5fab5a 100644
--- a/src/java/org/apache/ivy/core/report/DownloadStatus.java
+++ b/src/java/org/apache/ivy/core/report/DownloadStatus.java
@@ -38,7 +38,8 @@ public final class DownloadStatus {
/**
* Returns the {@link DownloadStatus} corresponding to the given String representation.
- *
+ *
+ * @param status String
* @return the {@link DownloadStatus} corresponding to the given String representation.
* @throws IllegalArgumentException
* if the given String does not correspond to any {@link DownloadStatus}.
diff --git a/src/java/org/apache/ivy/core/report/ResolveReport.java b/src/java/org/apache/ivy/core/report/ResolveReport.java
index 0fb05f09..01be7487 100644
--- a/src/java/org/apache/ivy/core/report/ResolveReport.java
+++ b/src/java/org/apache/ivy/core/report/ResolveReport.java
@@ -128,7 +128,7 @@ public class ResolveReport {
/**
* Get every report on the download requests.
- *
+ *
* @return the list of reports, never null
*/
public ArtifactDownloadReport[] getFailedArtifactsReports() {
@@ -138,7 +138,7 @@ public class ResolveReport {
/**
* Get every report on the download requests.
- *
+ *
* @return the list of reports, never null
*/
public ArtifactDownloadReport[] getAllArtifactsReports() {
@@ -148,7 +148,7 @@ public class ResolveReport {
/**
* Get the report on the download requests. The list of download report can be restricted to a
* specific download status, and also remove the download report for the evicted modules.
- *
+ *
* @param downloadStatus
* the status of download to retrieve. Set it to null for no restriction
* on the download status
@@ -184,7 +184,11 @@ public class ResolveReport {
}
}
- /** Can only be called if checkIfChanged has been called */
+ /**
+ * Can only be called if checkIfChanged has been called
+ *
+ * @return boolean
+ */
public boolean hasChanged() {
for (ConfigurationResolveReport report : confReports.values()) {
if (report.hasChanged()) {
@@ -245,7 +249,7 @@ public class ResolveReport {
/**
* Returns the list of all dependencies concerned by this report as a List of IvyNode ordered
* from the more dependent to the least one
- *
+ *
* @return The list of all dependencies.
*/
public ListIvyNode node = ... node.loadData(); node = node.getRealNode(); ...
+ *
+ * @param rootModuleConf String
+ * @param parent IvyNode
+ * @param parentConf String
+ * @param conf String
+ * @param shouldBePublic boolean
+ * @param usage IvyNodeUsage
+ * @return boolean
*/
public boolean loadData(String rootModuleConf, IvyNode parent, String parentConf, String conf,
boolean shouldBePublic, IvyNodeUsage usage) {
@@ -312,7 +321,7 @@ public class IvyNode implements Comparable
* The resulting collection of nodes may have some configuration to load
- *
+ *
* @param rootModuleConf
* the requested configuration of the root module
* @param conf
@@ -515,7 +524,7 @@ public class IvyNode implements Comparable
* A blacklisted node should be considered as if it doesn't even exist on the repository. *
- * + * * @param rootModuleConf * the root module conf for which we'd like to know if the node is blacklisted - * + * * @return true if this node is blacklisted int he given root module conf, false otherwise * @see #blacklist(IvyNodeBlacklist) */ @@ -1268,7 +1283,7 @@ public class IvyNode implements Comparablenull
* if this node is not blacklisted in this root module conf.
- *
+ *
* @param rootModuleConf
* the root module configuration to consider
* @return the blacklist data if any
@@ -1308,7 +1323,7 @@ public class IvyNode implements Comparable
* The IvyNodes are ordered from the most dependent to the less dependent, so that
* an IvyNode is always found in the list after all IvyNode depending directly on it.
- *
+ *
* @param md
* the descriptor of the module for which we want to get dependencies - must not be
* null
@@ -817,7 +837,7 @@ public class ResolveEngine {
/**
* Returns true if we've already fetched the dependencies for this node and configuration
- *
+ *
* @param node
* node to check
* @param conf
@@ -847,11 +867,12 @@ public class ResolveEngine {
/**
* Resolves conflict for the given node in the given ancestor. This method do conflict
* resolution in ancestor parents recursively, unless not necessary.
- *
+ *
* @param node
* the node for which conflict resolution should be done
* @param ancestor
* the ancestor in which the conflict resolution should be done
+ * @param conf String
* @param toevict
* a collection of IvyNode to evict (as computed by conflict resolution in
* descendants of ancestor)
@@ -1033,7 +1054,7 @@ public class ResolveEngine {
/**
* Compute possible conflicts for a node, in the context of an ancestor (a node which has a
* dependency - direct or indirect - on the node for which conflicts should be computed.
- *
+ *
* @param node
* the node for which conflicts should be computed
* @param ancestor
@@ -1159,7 +1180,7 @@ public class ResolveEngine {
* The mediated dependency descriptor must return the actually requested module revision id when
* the method {@link DependencyDescriptor#getDependencyRevisionId()} is called.
*
null to use settings configured resolve
* mode.
- *
+ *
* @return the resolve mode to use.
*/
public String getResolveMode() {
@@ -169,7 +169,8 @@ public class ResolveOptions extends LogOptions {
* Indicates if the configurations use a special configuration * , *(private) or *(public). When
* special configurations are used, you must have the module descriptor in order to get the list
* of configurations.
- *
+ *
+ * @return boolean
* @see #getConfs()
* @see #getConfs(ModuleDescriptor)
*/
@@ -185,6 +186,7 @@ public class ResolveOptions extends LogOptions {
/**
* @pre can only be called if useSpecialConfs()==false. When it is true, you have to provide a
* module descriptor so that configurations can be resolved.
+ * @return String[]
* @see #getConfs(ModuleDescriptor)
*/
public String[] getConfs() {
@@ -197,10 +199,11 @@ public class ResolveOptions extends LogOptions {
/**
* Get the asked confs. Special confs (like *) use the moduleDescriptor to find the values *
- *
+ *
* @param md
* Used to get the exact values for special confs.
- * */
+ * @return String[]
+ */
public String[] getConfs(ModuleDescriptor md) {
// TODO add isInline, in that case, replace * by *(public).
return ConfigurationUtils.replaceWildcards(confs, md);
diff --git a/src/java/org/apache/ivy/core/resolve/VisitNode.java b/src/java/org/apache/ivy/core/resolve/VisitNode.java
index c38bce19..b5171b96 100644
--- a/src/java/org/apache/ivy/core/resolve/VisitNode.java
+++ b/src/java/org/apache/ivy/core/resolve/VisitNode.java
@@ -40,11 +40,11 @@ import org.apache.ivy.util.Checks;
* dependency graph following the dependencies, thus the same node can be visited several times, if
* it is requested from several module. In this case you will have one VisitNode per parent and per
* root module configuration. Thus VisitNode stores data specific to the visit:
- * * ModuleId are returned in the system namespace. *
- * - * @param moduleCrit - * ModuleId - * @param matcher + * + * @param moduleCrit ModuleId + * @param matcher PatternMatcher * @return ModuleId[] */ public ModuleId[] listModules(ModuleId moduleCrit, PatternMatcher matcher) { @@ -214,10 +213,9 @@ public class SearchEngine { ** ModuleRevisionId are returned in the system namespace. *
- * - * @param moduleCrit - * ModuleRevisionId - * @param matcher + * + * @param moduleCrit ModuleRevisionId + * @param matcher PatternMatcher * @return ModuleRevisionId[] */ public ModuleRevisionId[] listModules(ModuleRevisionId moduleCrit, PatternMatcher matcher) { @@ -269,7 +267,7 @@ public class SearchEngine { ** ModuleRevisionId are returned in the system namespace. *
- * + * * @param resolver * the resolver in which modules should looked up * @param moduleCrit diff --git a/src/java/org/apache/ivy/core/settings/IvySettings.java b/src/java/org/apache/ivy/core/settings/IvySettings.java index 89c68efa..4b07c0bd 100644 --- a/src/java/org/apache/ivy/core/settings/IvySettings.java +++ b/src/java/org/apache/ivy/core/settings/IvySettings.java @@ -420,8 +420,8 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P * Default initialization of settings, useful when you don't want to load your settings from a * settings file or URL, but prefer to set them manually. By calling this method you will still * have the basic initialization done when loading settings. - * - * @throws IOException + * + * @throws IOException if something goes wrong */ public synchronized void defaultInit() throws IOException { if (getVariable("ivy.default.ivy.user.dir") != null) { @@ -491,7 +491,7 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P /** * Sets a deprecated variable with the value of the new variable - * + * * @param deprecatedKey * the deprecated variable name * @param newKey @@ -611,7 +611,7 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P /** * Substitute variables in the given string by their value found in the current set of variables - * + * * @param str * the string in which substitution should be made * @return the string where all current ivy variables have been substituted by their value If @@ -624,7 +624,7 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P /** * Substitute variables in the given map values by their value found in the current set of * variables - * + * * @param strings * the map of strings in which substitution should be made * @return a new map of strings in which all current ivy variables in values have been @@ -641,7 +641,7 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P /** * Returns the variables loaded in configuration file. Those variables may better be seen as ant * properties - * + * * @return IvyVariableContainer */ public synchronized IvyVariableContainer getVariables() { @@ -775,6 +775,13 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P /** * regular expressions as explained in Pattern class may be used in attributes + * + * @param attributes Map + * @param matcher PatternMatcher + * @param resolverName String + * @param branch String + * @param conflictManager String + * @param resolveMode String */ public synchronized void addModuleConfiguration(Map
* If the specified file name is relative it is resolved with respect to the settings's base
* directory.
- *
+ *
* @param fileName
* The name of the file to resolve. Must not be
* This class is designed to be used internally by the ModuleDescriptorSorter.
+ *
* ModuleDescriptorSorter use CollectionOfModulesToSort to find the dependencies of the modules, and
* use ModuleInSort to store some temporary values attached to the modules to sort.
- *
+ *
+ * The added fields are:
+ *
- * Here is an example of what this conflict manager is able to do:
* DetailsThe conflict manager finds that the latest matching version of #B (1.5) depends on
* a version of #D incompatible with what is expected by the latest matching version of #C. Hence
* the conflict manager blacklists #B;1.5, and the version range [1.0,1.5] is resolved again to end
@@ -126,7 +126,7 @@ public class LatestCompatibleConflictManager extends LatestConflictManager {
* Handles an incompatible conflict
*
* An incompatible conflicts is handled with this pseudo algorithm:
- *
+ *
* null.
- *
+ *
* @return the resolved File.
- *
+ *
*/
public synchronized File resolveFile(String fileName) {
return FileUtil.resolveFile(baseDir, fileName);
@@ -1211,7 +1218,7 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
/**
* Filters the names list by removing all names that should be ignored as defined by the listing
* ignore list
- *
+ *
* @param names ditto
*/
public synchronized void filterIgnore(Collection
+ * dedicated function to retrieve module descriptors based on dependencies descriptors.
+ *
+ * Inner helper class for sorting ModuleDescriptors.
+ *
- * The added fields are :
+ * ModuleInSort can be used in only one ModuleDescriptorSorter at a time.
+ *
- *
*/
class ModuleInSort {
@@ -103,7 +106,7 @@ class ModuleInSort {
* dependency. If it is, all the elements of the loop are flagged as 'loopIntermediateElement',
* and the loopElements of this module (which is the root of the loop) is updated. The
* depStrategy is invoked on order to report a correct circular loop message.
- *
+ *
* @param futurCaller ModuleInSort
* @param depStrategy CircularDependencyStrategy
* @return true if a loop is detected.
@@ -130,7 +133,7 @@ class ModuleInSort {
* Add this module to the sorted list except if this module is an intermediary element of a
* loop. If this module is the 'root' of a loop, then all elements of that loops are added
* before.
- *
+ *
* @param sorted
* The list of sorted elements on which this module will be added
*/
diff --git a/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java b/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
index c97d9665..2545de1e 100644
--- a/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
+++ b/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
@@ -77,11 +77,14 @@ public class BundleInfoAdapter {
}
/**
- *
+ * @param parser ModuleDescriptorParser
* @param baseUri
* uri to help build the absolute url if the bundle info has a relative uri.
+ * @param bundle BundleInfo
+ * @param manifest Manifest
+ * @param profileProvider ExecutionEnvironmentProfileProvider
* @return DefaultModuleDescriptor ditto
- * @throws ProfileNotFoundException
+ * @throws ProfileNotFoundException if descriptor is not found
*/
public static DefaultModuleDescriptor toModuleDescriptor(ModuleDescriptorParser parser,
URI baseUri, BundleInfo bundle, Manifest manifest,
diff --git a/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java b/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
index bebdc1f9..16fb9677 100644
--- a/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
+++ b/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
@@ -107,7 +107,7 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
/**
* Return an sort of identifier of the current element being parsed. It will only be used for
* logging purpose.
- *
+ *
* @return an empty string by default
*/
protected String getCurrentElementIdentifier() {
@@ -160,10 +160,11 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * @throws SAXException
+ * By default do nothing.
+ *
+ * @throws SAXException API told me so
*/
protected void doStartDocument() throws SAXException {
- // by default do nothing
}
@Override
@@ -179,10 +180,11 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * @throws SAXException
+ * By default do nothing.
+ *
+ * @throws SAXException API told me so
*/
protected void doEndDocument() throws SAXException {
- // by default do nothing
}
@Override
@@ -231,23 +233,27 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * Called when the expected node is achieved
- *
+ * Called when the expected node is achieved; nothing to do by default.
+ *
* @param atts
* the xml attributes attached to the expected node
* @exception SAXException
* in case the parsing should be completely stopped
*/
protected void handleAttributes(Attributes atts) throws SAXException {
- // nothing to do by default
}
/**
- * @throws SAXException
+ * By default do nothing.
+ *
+ * @param uri String
+ * @param localName String
+ * @param name String
+ * @param atts Attributes
+ * @throws SAXException API told me so
*/
protected void doStartElement(String uri, String localName, String name, Attributes atts)
throws SAXException {
- // by default do nothing
}
@Override
@@ -284,10 +290,14 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * @throws SAXException
+ * By default do nothing.
+ *
+ * @param uri String
+ * @param localName String
+ * @param name String
+ * @throws SAXException API told me so
*/
protected void doEndElement(String uri, String localName, String name) throws SAXException {
- // by default do nothing
}
public static abstract class ChildElementHandlerisSorted : is true iff this module has already been added to the sorted list.
- * isSorted : is true iff this module has already been added to the sorted
+ * list.loopElements : When the module is the root of a loop (=the first element of a
* loop met during the sort), loopElements contains all ModuleInSort of the loop
* (excluding the root itself.isLoopIntermediateElement : When a loop is detected, all modules included in the
* loop (except the root) have isLoopIntermediateElement set to true.caller : During the sort, we traverse recursively the graph. When doing that,
- * caller point to the parent element.
+ * caller point to the parent element.
+ * Here is an example of what this conflict manager is able to do:
+ *
* #A;2->{ #B;[1.0,1.5] #C;[2.0,2.5] }
* #B;1.4->#D;1.5
* #B;1.5->#D;2.0
* #C;2.5->#D;[1.0,1.6]
*
- *
- * Result: #B;1.4, #C;2.5, #D;1.5
+ * Result: #B;1.4, #C;2.5, #D;1.5
+ *
* take latest among two nodes in conflict
* for all callers
@@ -139,9 +139,9 @@ public class LatestCompatibleConflictManager extends LatestConflictManager {
* else
* throw strict conflict exception
*
- *
+ *
*
NB : it is for internal usage of Ivy only!
*/ public class WorkspaceLatestStrategy extends AbstractLatestStrategy { diff --git a/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java b/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java index 8fa26434..142898cb 100644 --- a/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java +++ b/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java @@ -139,12 +139,12 @@ public abstract class FileBasedLockStrategy extends AbstractLockStrategy { /** * Determine the state of the lockfile. - * + * * Must be called from within a synchronized block. - * + * * Three possibilities exist: - The lock is held by the current thread (>0) - The lock is held * by one or more different threads (-1) - The lock is not held at all (0). - * + * * @param file * file to lock * @param forThread @@ -169,10 +169,10 @@ public abstract class FileBasedLockStrategy extends AbstractLockStrategy { /** * Record that this thread holds the lock. - * + * * Asserts that the lock has been previously grabbed by this thread. Must be called from a * synchronized block in which the lock was grabbed. - * + * * @param file * file which has been locked * @param forThread @@ -193,11 +193,11 @@ public abstract class FileBasedLockStrategy extends AbstractLockStrategy { /** * Decrease depth of this thread's lock. - * + * * Must be called within a synchronized block. - * + * * If this returns 0, the caller is responsible for releasing the lock within that same block. - * + * * @param file * file for which lock depth is being decreased * @param forThread @@ -225,6 +225,9 @@ public abstract class FileBasedLockStrategy extends AbstractLockStrategy { /** * Return a string naming the threads which currently hold this lock. + * + * @param file File + * @return String */ protected String getCurrentLockHolderNames(File file) { StringBuilder sb = new StringBuilder(); diff --git a/src/java/org/apache/ivy/plugins/lock/LockStrategy.java b/src/java/org/apache/ivy/plugins/lock/LockStrategy.java index a28d6f87..31a0fb80 100644 --- a/src/java/org/apache/ivy/plugins/lock/LockStrategy.java +++ b/src/java/org/apache/ivy/plugins/lock/LockStrategy.java @@ -28,10 +28,11 @@ import org.apache.ivy.core.module.descriptor.Artifact; * Note that some implementations may actually choose to NOT perform locking, when no lock is * necessary (cache not shared). Some other implementations may choose to lock the cache for the * download of a whole module (not possible yet), or at the artifact level. - **
+ ** The lock methods should return true when the lock is either actually acquired or not performed by - * the strategy.
+ * the strategy. + * ** Locking used in the locking strategy must support reentrant lock. Reentrant locking should be * performed for the whole strategy. @@ -41,14 +42,14 @@ public interface LockStrategy { /** * Returns the name of the strategy - * + * * @return the name of the strategy */ String getName(); /** * Performs a lock before downloading the given {@link Artifact} to the given file. - * + * * @param artifact * the artifact about to be downloaded * @param artifactFileToDownload @@ -62,7 +63,7 @@ public interface LockStrategy { /** * Release the lock acquired for an artifact download. - * + * * @param artifact * the artifact for which the lock was acquired * @param artifactFileToDownload diff --git a/src/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcher.java b/src/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcher.java index 68e2f745..0e45c147 100644 --- a/src/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcher.java +++ b/src/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcher.java @@ -20,11 +20,12 @@ package org.apache.ivy.plugins.matcher; /** * A pattern matcher that tries to match exactly the input with the expression, or match it as a * pattern. - *
+ ** The evaluation for matching is perform first by checking if expression and input are equals (via * equals method) else it attempts to do it by trying to match the input using the expression as a * regexp. - * + *
+ * * @see ExactPatternMatcher * @see RegexpPatternMatcher */ diff --git a/src/java/org/apache/ivy/plugins/matcher/ExactPatternMatcher.java b/src/java/org/apache/ivy/plugins/matcher/ExactPatternMatcher.java index 0613e380..c29eff7d 100644 --- a/src/java/org/apache/ivy/plugins/matcher/ExactPatternMatcher.java +++ b/src/java/org/apache/ivy/plugins/matcher/ExactPatternMatcher.java @@ -19,9 +19,10 @@ package org.apache.ivy.plugins.matcher; /** * Implementation of an exact matcher. - * + ** The matching will be performed against an expression being a string. It will only matches if both * strings are equal (per equals()) rule or if both strings are null. + *
*/ public/* @Immutable */final class ExactPatternMatcher extends AbstractPatternMatcher { diff --git a/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java b/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java index 96a8d3ae..9e9b22a1 100644 --- a/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java +++ b/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java @@ -30,10 +30,12 @@ import org.apache.oro.text.regex.Perl5Matcher; *+ * NOTE: this matcher is available only with + * Apache Jakarta Oro 2.0.8 + * in your classpath. + *
+ * * @see GlobCompiler */ public/* @Immutable */final class GlobPatternMatcher extends AbstractPatternMatcher { diff --git a/src/java/org/apache/ivy/plugins/matcher/PatternMatcher.java b/src/java/org/apache/ivy/plugins/matcher/PatternMatcher.java index 27b35ebd..16b5145c 100644 --- a/src/java/org/apache/ivy/plugins/matcher/PatternMatcher.java +++ b/src/java/org/apache/ivy/plugins/matcher/PatternMatcher.java @@ -19,9 +19,10 @@ package org.apache.ivy.plugins.matcher; /** * Interface for a pattern matcher. - * + ** The pattern matcher is the main abstraction regarding the matching of an expression. * Implementation may vary depending on the expression syntax handling that is desired. + *
*/ public interface PatternMatcher { @@ -52,7 +53,7 @@ public interface PatternMatcher { /** * Return the matcher for the given expression. - * + * * @param expression * the expression to be matched. Cannot be null ? * @return the matcher instance for the given expression. Never null. @@ -61,7 +62,7 @@ public interface PatternMatcher { /** * return the name of this pattern matcher - * + * * @return the name of this pattern matcher. Never null. * @see #EXACT * @see #REGEXP diff --git a/src/java/org/apache/ivy/plugins/parser/ModuleDescriptorParser.java b/src/java/org/apache/ivy/plugins/parser/ModuleDescriptorParser.java index 0971f338..cfd36366 100644 --- a/src/java/org/apache/ivy/plugins/parser/ModuleDescriptorParser.java +++ b/src/java/org/apache/ivy/plugins/parser/ModuleDescriptorParser.java @@ -39,8 +39,12 @@ public interface ModuleDescriptorParser { * Convert a module descriptor to an ivy file. This method MUST close the given input stream * when job is finished * - * @param is - * input stream with opened on original module descriptor resource + * @param is input stream with opened on original module descriptor resource + * @param res Resource + * @param destFile File + * @param md ModuleDescriptor + * @throws ParseException if something goes wrong + * @throws IOException if something goes wrong */ public void toIvyFile(InputStream is, Resource res, File destFile, ModuleDescriptor md) throws ParseException, IOException; diff --git a/src/java/org/apache/ivy/plugins/parser/ParserSettings.java b/src/java/org/apache/ivy/plugins/parser/ParserSettings.java index 662736c7..82945471 100644 --- a/src/java/org/apache/ivy/plugins/parser/ParserSettings.java +++ b/src/java/org/apache/ivy/plugins/parser/ParserSettings.java @@ -55,7 +55,7 @@ public interface ParserSettings { String getDefaultBranch(ModuleId moduleId); /** - * Returns the namespace context in which the current descriptor is parsed. + * @return the namespace context in which the current descriptor is parsed. */ Namespace getContextNamespace(); diff --git a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java index 9bb6433e..ced6e55a 100644 --- a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java +++ b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java @@ -59,11 +59,13 @@ import org.xml.sax.SAXException; /** * A parser for Maven 2 POM. *
- * The configurations used in the generated module descriptor mimics the behavior defined by maven 2
- * scopes, as documented here:
- * http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html The
- * PomModuleDescriptorParser use a PomDomReader to read the pom, and the PomModuleDescriptorBuilder
- * to write the ivy module descriptor using the info read by the PomDomReader.
+ * The configurations used in the generated module descriptor mimics the behavior defined by Maven 2
+ * scopes, as documented
+ * here.
+ * The PomModuleDescriptorParser use a PomDomReader to read the pom, and the
+ * PomModuleDescriptorBuilder to write the ivy module descriptor using the info read by the
+ * PomDomReader.
+ *
* Override this method if you want to use a custom Parser. *
- * + * * @param ivySettings * the settings to use during parsing * @return the Parser instance used for parsing Ivy files @@ -396,7 +396,7 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser { /** * Default parent location to check (for dev ONLY) - * + * * @return a relative path to a parent module descriptor */ protected String getDefaultParentLocation() { @@ -411,9 +411,9 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser { *
* For example, if "moduleElement" is "dependencies", guarantees that "configurations" has
* been written. If moduleElement is null, then all missing merged
* elements will be flushed.
*
item to out.
- *
+ *
* @param parent
* the module descriptor containing item
* @param item
* subcomponent of the descriptor, for example a {@link DependencyDescriptor} or
* {@link Configuration}
+ * @param out PrintWriter
*/
public void print(ModuleDescriptor parent, Object item, PrintWriter out);
}
diff --git a/src/java/org/apache/ivy/plugins/report/XmlReportParser.java b/src/java/org/apache/ivy/plugins/report/XmlReportParser.java
index c24fc11c..a0d57370 100644
--- a/src/java/org/apache/ivy/plugins/report/XmlReportParser.java
+++ b/src/java/org/apache/ivy/plugins/report/XmlReportParser.java
@@ -322,6 +322,8 @@ public class XmlReportParser {
/**
* Returns the ModuleRevisionId of the resolved module.
+ *
+ * @return ModuleRevisionId
*/
public ModuleRevisionId getResolvedModule() {
return parser.getResolvedModule();
diff --git a/src/java/org/apache/ivy/plugins/repository/Repository.java b/src/java/org/apache/ivy/plugins/repository/Repository.java
index 5bec7656..e78f20a1 100644
--- a/src/java/org/apache/ivy/plugins/repository/Repository.java
+++ b/src/java/org/apache/ivy/plugins/repository/Repository.java
@@ -26,28 +26,19 @@ import org.apache.ivy.core.module.descriptor.Artifact;
/**
* Represents a collection of resources available to Ivy. Ivy uses one or more repositories as both
* a source of resources for Ivy enabled build systems and as a distribution center for resources
- * generated by Ivy enabled build systems.
- * - * A repository supports the following fundamental operations + * generated by Ivy enabled build systems. + *
A repository supports the following fundamental operations
*- * {@link #get} retrieves a resource specified by a provided identifier creating a new file . - *
- *- * {@link #put} transfers a file to the repository. - *
- *- * {@link #list} returns a listing of file like objects belonging to a specified parent directory. - *
- * + *{@link #get} retrieves a resource specified by a provided identifier creating a new file.
+ *{@link #put} transfers a file to the repository.
+ *{@link #list} returns a listing of file like objects belonging to a specified parent directory.
*/ public interface Repository { @@ -55,7 +46,7 @@ public interface Repository { * Return the resource associated with a specified identifier. If the resource does not exist, * it should return a Resource with exists() returning false. An IOException should only be * thrown when a real IO problem occurs, like the impossibility to connect to a server. - * + * * @param source * A string identifying the resource. * @return The resource associated with the resource identifier. @@ -66,7 +57,7 @@ public interface Repository { /** * Fetch a resource from the repository. - * + * * @param source * A string identifying the resource to be fetched. * @param destination @@ -78,7 +69,7 @@ public interface Repository { /** * Transfer a resource to the repository - * + * * @param artifact * The artifact to be transferred. * @param source @@ -95,7 +86,7 @@ public interface Repository { /** * Return a listing of resources names - * + * * @param parent * The parent directory from which to generate the listing. * @return A listing of the parent directory's file content @@ -106,7 +97,7 @@ public interface Repository { /** * Add a listener to the repository. - * + * * @param listener * The listener to attach to the repository. */ @@ -114,7 +105,7 @@ public interface Repository { /** * Remove a listener on the repository - * + * * @param listener * The listener to remove */ @@ -122,7 +113,7 @@ public interface Repository { /** * Determine if a given listener is attached to the repository. - * + * * @param listener * The listener being queried * @returntrue if the provided listener is attached to the repository,
@@ -132,14 +123,14 @@ public interface Repository {
/**
* Get the repository's file separator string.
- *
+ *
* @return The repository's file separator delimiter
*/
String getFileSeparator();
/**
* Normalize a string.
- *
+ *
* @param source
* The string to normalize.
* @return The normalized string.
@@ -148,6 +139,8 @@ public interface Repository {
/**
* Return the name of the repository
+ *
+ * @return String name
*/
String getName();
}
diff --git a/src/java/org/apache/ivy/plugins/repository/Resource.java b/src/java/org/apache/ivy/plugins/repository/Resource.java
index 7a622693..950c02a4 100644
--- a/src/java/org/apache/ivy/plugins/repository/Resource.java
+++ b/src/java/org/apache/ivy/plugins/repository/Resource.java
@@ -29,18 +29,17 @@ import java.io.InputStream;
* false, 0, ""). In other words, the specified interface
+ * false, 0, ""). In other words, the specified interface
* methods should not throw RuntimeExceptions.false, 0, "").boolean value indicating if the resource is available.
@@ -95,6 +94,7 @@ public interface Resource {
* Opens a stream on this resource
*
* @return the opened input stream
+ * @throws IOException if something goes wrong
*/
public InputStream openStream() throws IOException;
}
diff --git a/src/java/org/apache/ivy/plugins/repository/TransferEvent.java b/src/java/org/apache/ivy/plugins/repository/TransferEvent.java
index 68c5adf9..64517e7f 100644
--- a/src/java/org/apache/ivy/plugins/repository/TransferEvent.java
+++ b/src/java/org/apache/ivy/plugins/repository/TransferEvent.java
@@ -25,25 +25,25 @@ import org.apache.ivy.core.event.IvyEvent;
* TransferEvent is used to notify TransferListeners about progress in transfer of resources form/to
* the repository This class is LARGELY inspired by org.apache.maven.wagon.events.TransferEvent
* released under the following copyright license:
- *
+ *
* - * + * * Copyright 2001-2005 The Apache Software Foundation. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * *- * + * * Original class written by Michal Maczka. */ public class TransferEvent extends IvyEvent { @@ -184,9 +184,9 @@ public class TransferEvent extends IvyEvent { /** * Returns the request type. - * + * * @return Returns the request type. The Request type is one of - *
TransferEvent.REQUEST_GET or TransferEvent.REQUEST_PUT
+ * TransferEvent.REQUEST_GET or TransferEvent.REQUEST_PUT
*/
public int getRequestType() {
return requestType;
@@ -194,10 +194,10 @@ public class TransferEvent extends IvyEvent {
/**
* Sets the request type
- *
+ *
* @param requestType
* The requestType to set. The Request type value should be either
- * TransferEvent.REQUEST_GET or TransferEvent.REQUEST_PUT.
+ * TransferEvent.REQUEST_GET or TransferEvent.REQUEST_PUT
* @throws IllegalArgumentException
* when
*/
@@ -303,22 +303,16 @@ public class TransferEvent extends IvyEvent {
/**
* Returns the elapsed time (in ms) between when the event entered one type until it entered
* another event time.
- *
- * This is especially useful to get the elapsed transfer time:
- *
+ *
This is especially useful to get the elapsed transfer time:
*
* getElapsedTime(TransferEvent.TRANSFER_STARTED, TransferEvent.TRANSFER_COMPLETED);
*
- *
- *
- *
- * Special cases:
+ *
Special cases:
*
* - returns -1 if the event never entered the fromEventType or the toEventType.
* - returns 0 if the event entered toEventType before fromEventType
*
- *
- *
+ *
* @param fromEventType
* the event type constant from which time should be measured
* @param toEventType
@@ -345,7 +339,7 @@ public class TransferEvent extends IvyEvent {
/**
* Checks the given event type is a valid event type, throws an {@link IllegalArgumentException}
* if it isn't
- *
+ *
* @param eventType
* the event type to check
*/
diff --git a/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java b/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java
index 276cc253..d61c0ba3 100644
--- a/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java
+++ b/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java
@@ -68,10 +68,11 @@ public abstract class AbstractSshBasedRepository extends AbstractRepository {
/**
* get a new session using the default attributes if the given String is a full uri, use the
* data from the uri instead
- *
+ *
* @param pathOrUri
* might be just a path or a full ssh or sftp uri
* @return matching Session
+ * @throws IOException if something goes wrong
*/
protected Session getSession(String pathOrUri) throws IOException {
URI uri = parseURI(pathOrUri);
@@ -134,7 +135,7 @@ public abstract class AbstractSshBasedRepository extends AbstractRepository {
/**
* Just check the uri for sanity
- *
+ *
* @param source
* String of the uri
* @return URI object of the String or null
@@ -170,7 +171,7 @@ public abstract class AbstractSshBasedRepository extends AbstractRepository {
/**
* Called, when user was not found in URL. Maintain static hash of credentials and retrieve or
* ask credentials for host.
- *
+ *
* @param host
* host for which we want to get credentials.
* @return credentials for given host
@@ -194,7 +195,7 @@ public abstract class AbstractSshBasedRepository extends AbstractRepository {
/**
* closes the session and remove it from the cache (eg. on case of errors)
- *
+ *
* @param session
* key for the cache
* @param pathOrUri
@@ -207,7 +208,7 @@ public abstract class AbstractSshBasedRepository extends AbstractRepository {
/**
* set the default user to use for the connection if no user is given or a PEM file is used
- *
+ *
* @param user
* to use
*/
@@ -224,7 +225,7 @@ public abstract class AbstractSshBasedRepository extends AbstractRepository {
/**
* Sets the full file path to use for accessing a PEM key file
- *
+ *
* @param filePath
* fully qualified name
*/
diff --git a/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java b/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
index de876551..7b24ecb2 100644
--- a/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
+++ b/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
@@ -108,7 +108,7 @@ public final class SshCache {
/**
* attach an sftp channel to this cache entry
- *
+ *
* @param newChannel
* to attach
*/
@@ -150,7 +150,7 @@ public final class SshCache {
/**
* key is username / host / port
- *
+ *
* @see #createCacheKey(String, String, int) for details
*/
private Map uriCacheMap = new HashMap();
@@ -177,7 +177,7 @@ public final class SshCache {
/**
* Creates a combined cache key from the given key parts
- *
+ *
* @param user
* name of the user
* @param host
@@ -197,7 +197,7 @@ public final class SshCache {
/**
* retrieves a session entry for a given session from the cache
- *
+ *
* @param session
* to retrieve cache entry for
* @return null or the existing entry
@@ -209,7 +209,7 @@ public final class SshCache {
/**
* Sets a session to a given combined key into the cache If an old session object already
* exists, close and remove it
- *
+ *
* @param user
* of the session
* @param host
@@ -246,7 +246,7 @@ public final class SshCache {
/**
* discards session entries from the cache
- *
+ *
* @param session
* to clear
*/
@@ -259,10 +259,11 @@ public final class SshCache {
/**
* retrieves an sftp channel from the cache
- *
+ *
* @param session
* to connect to
* @return channelSftp or null if not successful (channel not existent or dead)
+ * @throws IOException if something goes wrong
*/
public ChannelSftp getChannelSftp(Session session) throws IOException {
ChannelSftp channel = null;
@@ -279,7 +280,7 @@ public final class SshCache {
/**
* attaches a channelSftp to an existing session cache entry
- *
+ *
* @param session
* to attach the channel to
* @param channel
@@ -295,7 +296,7 @@ public final class SshCache {
/**
* Attempts to connect to a local SSH agent (using either UNIX sockets or PuTTY's Pageant)
- *
+ *
* @param jsch
* Connection to be attached to an available local agent
* @return true if connected to agent, false otherwise
@@ -313,7 +314,7 @@ public final class SshCache {
/**
* Gets a session from the cache or establishes a new session if necessary
- *
+ *
* @param host
* to connect to
* @param port
@@ -331,6 +332,7 @@ public final class SshCache {
* @param allowedAgentUse
* Whether to communicate with an agent for authentication
* @return session or null if not successful
+ * @throws IOException if something goes wrong
*/
public Session getSession(String host, int port, String username, String userPassword,
File pemFile, String pemPassword, File passFile, boolean allowedAgentUse)
diff --git a/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java b/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java
index cbe654f9..4590a67a 100644
--- a/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java
+++ b/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java
@@ -68,7 +68,7 @@ public class SshRepository extends AbstractSshBasedRepository {
/**
* Fetch the needed file information for a given file (size, last modification time) and report
* it back in a SshResource
- *
+ *
* @param source
* ssh uri for the file to get info for
* @return SshResource filled with the needed information
@@ -103,7 +103,7 @@ public class SshRepository extends AbstractSshBasedRepository {
/**
* Reads out the output of a ssh session exec
- *
+ *
* @param channel
* Channel to read from
* @param strStdout
@@ -157,7 +157,7 @@ public class SshRepository extends AbstractSshBasedRepository {
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.ivy.repository.Repository#list(java.lang.String)
*/
public List list(String parent) throws IOException {
@@ -211,7 +211,7 @@ public class SshRepository extends AbstractSshBasedRepository {
/**
* Replace the argument placeholder with argument or append the argument if no placeholder is
* present
- *
+ *
* @param command
* with argument placeholder or not
* @param argument ditto
@@ -229,7 +229,7 @@ public class SshRepository extends AbstractSshBasedRepository {
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.ivy.repository.Repository#put(java.io.File, java.lang.String, boolean)
*/
public void put(File source, String destination, boolean overwrite) throws IOException {
@@ -279,7 +279,7 @@ public class SshRepository extends AbstractSshBasedRepository {
/**
* Tries to create a directory path on the target system
- *
+ *
* @param path
* to create
* @param session
@@ -316,7 +316,7 @@ public class SshRepository extends AbstractSshBasedRepository {
/**
* check for existence of file or dir on target system
- *
+ *
* @param filePath
* to the object to check
* @param session
@@ -337,7 +337,7 @@ public class SshRepository extends AbstractSshBasedRepository {
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.ivy.repository.Repository#get(java.lang.String, java.io.File)
*/
public void get(String source, File destination) throws IOException {
@@ -373,7 +373,7 @@ public class SshRepository extends AbstractSshBasedRepository {
/**
* sets the list command to use for a directory listing listing must be only the filename and
* each filename on a separate line
- *
+ *
* @param cmd
* to use. default is "ls -1"
*/
@@ -422,7 +422,7 @@ public class SshRepository extends AbstractSshBasedRepository {
* The file separator is the separator to use on the target system On a unix system it is '/',
* but I don't know, how this is solved on different ssh implementations. Using the default
* might be fine
- *
+ *
* @param fileSeparator
* The fileSeparator to use. default '/'
*/
@@ -433,6 +433,8 @@ public class SshRepository extends AbstractSshBasedRepository {
/**
* A four digit string (e.g., 0644, see "man chmod", "man open") specifying the permissions of
* the published files.
+ *
+ * @param permissions String
*/
public void setPublishPermissions(String permissions) {
this.publishPermissions = permissions;
@@ -448,10 +450,11 @@ public class SshRepository extends AbstractSshBasedRepository {
/**
* Not really streaming...need to implement a proper streaming approach?
- *
+ *
* @param resource
* to stream
* @return InputStream of the resource data
+ * @throws IOException if something goes wrong
*/
public InputStream openStream(SshResource resource) throws IOException {
Session session = getSession(resource.getName());
diff --git a/src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java b/src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java
index 65198119..914757f2 100644
--- a/src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java
+++ b/src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java
@@ -117,10 +117,10 @@ public class VfsRepository extends AbstractRepository {
/**
* Get a VfsResource
- *
+ *
* @param vfsURI
* a String identifying a VFS Resource
- * @throws IOException on failure
+ * @throws IOException on failure
* @see "Supported File Systems in the jakarta-commons-vfs documentation"
*/
public Resource getResource(String vfsURI) throws IOException {
@@ -129,12 +129,12 @@ public class VfsRepository extends AbstractRepository {
/**
* Transfer a VFS Resource from the repository to the local file system.
- *
+ *
* @param srcVfsURI
* a String identifying the VFS resource to be fetched
* @param destination
* a File identifying the destination file
- * @throws IOException on failure
+ * @throws IOException on failure
* @see "Supported File Systems in the jakarta-commons-vfs documentation"
*/
public void get(String srcVfsURI, File destination) throws IOException {
@@ -159,7 +159,7 @@ public class VfsRepository extends AbstractRepository {
/**
* Return a listing of the contents of a parent directory. Listing is a set of strings
* representing VFS URIs.
- *
+ *
* @param vfsURI
* providing identifying a VFS provided resource
* @throws IOException
@@ -188,14 +188,14 @@ public class VfsRepository extends AbstractRepository {
/**
* Transfer an Ivy resource to a VFS repository
- *
+ *
* @param source
* a File identifying the local file to transfer to the repository
* @param vfsURI
* a String identifying the destination VFS Resource.
* @param overwrite
* whether to overwrite an existing resource.
- * @throws IOException on failure.
+ * @throws IOException on failure.
* @see "Supported File Systems in the jakarta-commons-vfs documentation"
*/
public void put(File source, String vfsURI, boolean overwrite) throws IOException {
diff --git a/src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java b/src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java
index 5a979248..444b2f93 100644
--- a/src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java
+++ b/src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java
@@ -83,7 +83,7 @@ public class VfsResource implements Resource {
* Get a list of direct descendants of the given resource. Note that attempts to get a list of
* children does not result in an error. Instead an error message is
* logged and an empty ArrayList returned.
- *
+ *
* @return A ArrayList of VFSResources
*/
public List getChildren() {
@@ -112,7 +112,7 @@ public class VfsResource implements Resource {
/**
* Get the name of the resource.
- *
+ *
* @return a String representing the Resource URL.
*/
public String getName() {
@@ -126,9 +126,9 @@ public class VfsResource implements Resource {
/**
* The VFS FileName getURI method seems to have a bug in it where file: URIs will have 4 forward
* slashes instead of 3.
- *
+ *
* @param vfsURI ditto
- * @return a normalized String representing the VFS URI
+ * @return a normalized String representing the VFS URI
*/
public static String normalize(String vfsURI) {
if (vfsURI == null) {
@@ -143,7 +143,7 @@ public class VfsResource implements Resource {
/**
* Get the last modification time of the resource.
- *
+ *
* @return a long indicating last modified time.
*/
public long getLastModified() {
@@ -153,7 +153,7 @@ public class VfsResource implements Resource {
/**
* Get the size of the resource
- *
+ *
* @return a long representing the size of the resource (in bytes).
*/
public long getContentLength() {
@@ -163,7 +163,7 @@ public class VfsResource implements Resource {
/**
* Flag indicating whether a resource is available for querying
- *
+ *
* @return true if the resource is available for querying, false
* otherwise.
*/
@@ -174,7 +174,7 @@ public class VfsResource implements Resource {
/**
* Return a flag indicating whether a provided VFS resource physically exists
- *
+ *
* @return true if the resource physically exists, false otherwise.
*/
public boolean physicallyExists() {
diff --git a/src/java/org/apache/ivy/plugins/repository/vsftp/VsftpRepository.java b/src/java/org/apache/ivy/plugins/repository/vsftp/VsftpRepository.java
index 1ec8f4f1..59b99e76 100644
--- a/src/java/org/apache/ivy/plugins/repository/vsftp/VsftpRepository.java
+++ b/src/java/org/apache/ivy/plugins/repository/vsftp/VsftpRepository.java
@@ -306,6 +306,11 @@ public class VsftpRepository extends AbstractRepository {
* we compare the response with the expected message and deal with it. The problem is that this
* is very specific to the version of vsftp used for the test, That's why expected messages are
* obtained using overriddable protected methods.
+ *
+ * @param command String
+ * @param expectedResponse Pattern
+ * @param timeout long
+ * @throws IOException if something goes wrong
*/
protected void sendCommand(String command, Pattern expectedResponse, long timeout)
throws IOException {
@@ -638,7 +643,7 @@ public class VsftpRepository extends AbstractRepository {
/**
* Parses a ls -l line and transforms it in a resource
- *
+ *
* @param file ditto
* @param responseLine ditto
* @return Resource
@@ -729,7 +734,7 @@ public class VsftpRepository extends AbstractRepository {
/**
* Sets the reuse connection time. The same connection will be reused if the time here does not
* last between two commands. O indicates that the connection should never be reused
- *
+ *
* @param time long
*/
public void setReuseConnection(long time) {
diff --git a/src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java b/src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java
index 907ccb45..46be24a8 100644
--- a/src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java
@@ -47,7 +47,7 @@ public abstract class AbstractSshBasedResolver extends RepositoryResolver {
/**
* Sets the location of the Public Key file to use for authentication
- *
+ *
* @param filePath
* full file path name
*/
@@ -57,7 +57,7 @@ public abstract class AbstractSshBasedResolver extends RepositoryResolver {
/**
* Determines whether a local SSH agent may be used for authentication
- *
+ *
* @param allowedAgentUse
* true if an agent may be used if available
*/
@@ -69,6 +69,8 @@ public abstract class AbstractSshBasedResolver extends RepositoryResolver {
* Optional password file. If set the repository will use it as an encrypted property file, to
* load username and passwd entries, and to store them if the user choose to do so. Defaults to
* user.dir/.ivy/[host].sftp.passwd, set it to null to disable this feature.
+ *
+ * @param passfile File
*/
public void setPassfile(File passfile) {
getSshBasedRepository().setPassFile(passfile);
@@ -89,7 +91,7 @@ public abstract class AbstractSshBasedResolver extends RepositoryResolver {
* set and password based login is used, user will be prompted for it the password can also be
* set by using a full url for the pattern, like
* "sftp://user:password@myserver.com/path/to/repos/[artifact].[ext]"
- *
+ *
* @param password
* to use
*/
@@ -101,7 +103,7 @@ public abstract class AbstractSshBasedResolver extends RepositoryResolver {
* Sets the password to use for decrypting key file (if it is encrypted) if no password is set
* and the keyfile is encrypted, the user will be prompted for the password if the keyfile is
* passwordless, this parameter will be ignored if given
- *
+ *
* @param password
* to use
*/
@@ -112,7 +114,7 @@ public abstract class AbstractSshBasedResolver extends RepositoryResolver {
/**
* sets the user to use for the ssh communication the user can also be set by using a full url
* for the pattern, like "ssh://user@myserver.com/path/to/repos/[artifact].[ext]"
- *
+ *
* @param user
* on the target system
*/
@@ -123,7 +125,7 @@ public abstract class AbstractSshBasedResolver extends RepositoryResolver {
/**
* sets the host to use for the ssh communication the host can also be set by using a full url
* for the pattern, like "ssh://myserver.com/path/to/repos/[artifact].[ext]"
- *
+ *
* @param host
* of the target system
*/
@@ -135,7 +137,7 @@ public abstract class AbstractSshBasedResolver extends RepositoryResolver {
* sets the port to use for the ssh communication port 22 is default the port can also be set by
* using a full url for the pattern, like
* "sftp://myserver.com:8022/path/to/repos/[artifact].[ext]"
- *
+ *
* @param port
* of the target system
*/
diff --git a/src/java/org/apache/ivy/plugins/resolver/DependencyResolver.java b/src/java/org/apache/ivy/plugins/resolver/DependencyResolver.java
index 8bd4898b..80b98d35 100644
--- a/src/java/org/apache/ivy/plugins/resolver/DependencyResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/DependencyResolver.java
@@ -46,7 +46,7 @@ public interface DependencyResolver {
/**
* Should only be used by configurator
- *
+ *
* @param name
* the new name of the resolver
*/
@@ -57,8 +57,11 @@ public interface DependencyResolver {
* latest one (i.e. a revision uniquely identifying the revision of a module in the current
* environment - If this revision is not able to identify uniquely the revision of the module
* outside of the current environment, then the resolved revision must begin by ##)
- *
- * @throws ParseException
+ *
+ * @param dd DependencyDescriptor
+ * @param data ResolveData
+ * @return ResolvedModuleRevision
+ * @throws ParseException if something goes wrong
*/
ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data)
throws ParseException;
@@ -66,7 +69,7 @@ public interface DependencyResolver {
/**
* Finds the module descriptor for the specified DependencyDescriptor. If this resolver
* can't find the module descriptor, null is returned.
- *
+ *
* @param dd
* the dependency descriptor
* @param data
@@ -86,7 +89,7 @@ public interface DependencyResolver {
* The returned DownloadReport is never null, and always contain an
* {@link ArtifactDownloadReport} for each requested Artifact.
*
- *
+ *
* @param artifacts
* an array of artifacts to download. Must not be null.
* @param options
@@ -102,7 +105,7 @@ public interface DependencyResolver {
* locates and downloads a set of artifacts. This method uses an {@link ArtifactOrigin}, and as
* such is only used to materialize an already located Artifact.
*
- *
+ *
* @param artifact
* the location of the artifact to download. Must not be null.
* @param options
@@ -114,7 +117,7 @@ public interface DependencyResolver {
/**
* Returns true if the given artifact can be located by this resolver and actually
* exist.
- *
+ *
* @param artifact
* the artifact which should be tested.
* @return true if the given artifact can be located by this resolver and actually
@@ -125,7 +128,7 @@ public interface DependencyResolver {
/**
* Locates the given artifact and returns its location if it can be located by this resolver and
* if it actually exists, or null in other cases.
- *
+ *
* @param artifact
* the artifact which should be located
* @return the artifact location, or null if it can't be located by this resolver
@@ -148,7 +151,7 @@ public interface DependencyResolver {
/**
* Reports last artifact download failure as Messages
- *
+ *
* @param art Artifact
*/
void reportFailure(Artifact art);
@@ -159,21 +162,26 @@ public interface DependencyResolver {
// are registered in ivy too.
/**
- * List all the values the given token can take if other tokens are set as described in the
- * otherTokenValues map. For instance, if token = "revision" and the map contains
- * "organisation"->"foo" "module"->"bar" The results will be the list of revisions of the module
- * bar from the org foo.
+ * List all the values the given token can take if other tokens are set as
+ * described in the otherTokenValues map. For instance, if
+ * token = "revision" and the map contains "organisation"->"foo" "module"->"bar"
+ * The results will be the list of revisions of the module bar from the org foo.
*
- * Note that listing does not take into account namespaces, and return raw information without
- * any namespace transformation. The caller is responsible for calling namespace transformation
- * with the Namespace returned by {@link #getNamespace()}.
+ * Note that listing does not take into account namespaces, and return raw
+ * information without any namespace transformation. The caller is
+ * responsible for calling namespace transformation with the Namespace
+ * returned by {@link #getNamespace()}.
*
+ *
+ * @param token String
+ * @param otherTokenValues Map
+ * @return String[]
*/
String[] listTokenValues(String token, Map otherTokenValues);
/**
* Same as {@link #listTokenValues(String, Map)} but more generic.
- *
+ *
* @param tokens
* the tokens of the query
* @param criteria
@@ -190,7 +198,7 @@ public interface DependencyResolver {
/**
* Returns the namespace associated with this resolver.
- *
+ *
* @return the namespace associated with this resolver.
*/
Namespace getNamespace();
@@ -202,7 +210,7 @@ public interface DependencyResolver {
/**
* Returns the {@link RepositoryCacheManager} used to manage the repository cache associated
* with this dependency resolver.
- *
+ *
* @return the {@link RepositoryCacheManager} used to manage the repository cache associated
* with this dependency resolver.
*/
diff --git a/src/java/org/apache/ivy/plugins/resolver/SshResolver.java b/src/java/org/apache/ivy/plugins/resolver/SshResolver.java
index bdb5e986..3c68dcca 100644
--- a/src/java/org/apache/ivy/plugins/resolver/SshResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/SshResolver.java
@@ -31,6 +31,8 @@ public class SshResolver extends AbstractSshBasedResolver {
/**
* A four digit string (e.g., 0644, see "man chmod", "man open") specifying the permissions of
* the published files.
+ *
+ * @param permissions String
*/
public void setPublishPermissions(String permissions) {
((SshRepository) getRepository()).setPublishPermissions(permissions);
@@ -39,7 +41,7 @@ public class SshResolver extends AbstractSshBasedResolver {
/**
* sets the path separator used on the target system. Not sure if this is used or if '/' is used
* on all implementation. default is to use '/'
- *
+ *
* @param sep
* file separator to use on the target system
*/
@@ -57,6 +59,8 @@ public class SshResolver extends AbstractSshBasedResolver {
* the term %arg can be used in the command to substitute the path to be listed (e.g.
* "ls -1 %arg | grep -v CVS" to get a listing without CVS directory) if %arg is not part of the
* command, the path will be appended to the command default is: "ls -1"
+ *
+ * @param cmd String
*/
public void setListCommand(String cmd) {
((SshRepository) getRepository()).setListCommand(cmd);
@@ -65,9 +69,11 @@ public class SshResolver extends AbstractSshBasedResolver {
/**
* set the command to check for existence of a file the command has to be a shell command
* working on the target system and has to create an exit status of 0 for an existent file and
- * <> 0 for a non existing file given as argument the term %arg can be used in the command to
- * substitute the path to be listed if %arg is not part of the command, the path will be appended
- * to the command default is: "ls"
+ * <> 0 for a non existing file given as argument the term %arg can be used in the command
+ * to substitute the path to be listed if %arg is not part of the command, the path will be
+ * appended to the command default is: "ls"
+ *
+ * @param cmd String
*/
public void setExistCommand(String cmd) {
((SshRepository) getRepository()).setExistCommand(cmd);
@@ -78,6 +84,8 @@ public class SshResolver extends AbstractSshBasedResolver {
* command working on the target system and has to create a directory with the given argument
* the term %arg can be used in the command to substitute the path to be listed if %arg is not
* part of the command, the path will be appended to the command default is: "mkdir"
+ *
+ * @param cmd String
*/
public void setCreateDirCommand(String cmd) {
((SshRepository) getRepository()).setExistCommand(cmd);
diff --git a/src/java/org/apache/ivy/plugins/resolver/WorkspaceChainResolver.java b/src/java/org/apache/ivy/plugins/resolver/WorkspaceChainResolver.java
index a3662cfe..a1028d17 100644
--- a/src/java/org/apache/ivy/plugins/resolver/WorkspaceChainResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/WorkspaceChainResolver.java
@@ -20,9 +20,9 @@ package org.apache.ivy.plugins.resolver;
import org.apache.ivy.core.settings.IvySettings;
/**
- * Resolver which decorate normal resolver so that the workspace resolver can hijack the resolve
- * process
- * NB : it is for internal usage of Ivy only!
+ * Resolver which decorate normal resolver so that the workspace resolver can
+ * hijack the resolveprocess
+ * NB : it is for internal usage of Ivy only!
*/
public class WorkspaceChainResolver extends ChainResolver {
diff --git a/src/java/org/apache/ivy/plugins/resolver/packager/PackagerCacheEntry.java b/src/java/org/apache/ivy/plugins/resolver/packager/PackagerCacheEntry.java
index a7fe87a0..b88f0e57 100644
--- a/src/java/org/apache/ivy/plugins/resolver/packager/PackagerCacheEntry.java
+++ b/src/java/org/apache/ivy/plugins/resolver/packager/PackagerCacheEntry.java
@@ -81,14 +81,14 @@ public class PackagerCacheEntry {
/**
* Attempt to build this entry.
- *
+ *
* @param packagerResource
* packager metadata resource
* @param properties
* a map of properties to pass to the child Ant build responsible for dependency
* packaging
- *
- * @throws IllegalStateException
+ *
+ * @throws IOException
* if this entry has already been built
*/
public synchronized void build(Resource packagerResource, Map properties) throws IOException {
@@ -176,6 +176,8 @@ public class PackagerCacheEntry {
/**
* Has this entry been successfully built?
+ *
+ * @return boolean
*/
public synchronized boolean isBuilt() {
return this.built;
@@ -183,7 +185,9 @@ public class PackagerCacheEntry {
/**
* Get a built artifact.
- *
+ *
+ * @param artifact ditto
+ * @return ResolvedResource
* @throws IllegalStateException
* if this entry's built has not (yet) completed successfully
*/
diff --git a/src/java/org/apache/ivy/plugins/resolver/packager/PackagerResolver.java b/src/java/org/apache/ivy/plugins/resolver/packager/PackagerResolver.java
index 6a12ba14..26ed972c 100644
--- a/src/java/org/apache/ivy/plugins/resolver/packager/PackagerResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/packager/PackagerResolver.java
@@ -36,10 +36,11 @@ import org.apache.ivy.util.Message;
/**
* Resolver that performs a "build" operation to resolve artifacts.
- *
+ *
*
* The resolver is configured with a base URL, from which the "ivy.xml" and "packager.xml" files are
* resolved. The latter file contains instructions describing how to build the actual artifacts.
+ *
*/
public class PackagerResolver extends URLResolver {
@@ -93,6 +94,8 @@ public class PackagerResolver extends URLResolver {
/**
* Set root directory under which builds take place.
+ *
+ * @param buildRoot File
*/
public void setBuildRoot(File buildRoot) {
this.buildRoot = buildRoot;
@@ -100,6 +103,8 @@ public class PackagerResolver extends URLResolver {
/**
* Returns root directory under which builds take place.
+ *
+ * @return File
*/
public File getBuildRoot() {
return buildRoot;
@@ -107,6 +112,8 @@ public class PackagerResolver extends URLResolver {
/**
* Set resource cache directory.
+ *
+ * @param resourceCache File
*/
public void setResourceCache(File resourceCache) {
this.resourceCache = resourceCache;
@@ -114,6 +121,8 @@ public class PackagerResolver extends URLResolver {
/**
* Get resource cache directory.
+ *
+ * @return File
*/
public File getResourceCache() {
return resourceCache;
@@ -121,6 +130,8 @@ public class PackagerResolver extends URLResolver {
/**
* Set base resource override URL pattern.
+ *
+ * @param resourceURL String
*/
public void setResourceURL(String resourceURL) {
this.resourceURL = resourceURL;
@@ -128,6 +139,8 @@ public class PackagerResolver extends URLResolver {
/**
* Set pattern for locating "packager.xml" files.
+ *
+ * @param pattern String
*/
public void setPackagerPattern(String pattern) {
ArrayList list = new ArrayList();
@@ -137,6 +150,8 @@ public class PackagerResolver extends URLResolver {
/**
* Set whether to preserve build directories. Default is false.
+ *
+ * @param preserve boolean
*/
public void setPreserveBuildDirectories(boolean preserve) {
this.preserve = preserve;
@@ -144,6 +159,8 @@ public class PackagerResolver extends URLResolver {
/**
* Set whether to enable restricted mode. Default is true.
+ *
+ * @param restricted boolean
*/
public void setRestricted(boolean restricted) {
this.restricted = restricted;
@@ -151,6 +168,8 @@ public class PackagerResolver extends URLResolver {
/**
* Set whether to run ant with the -verbose flag. Default is false.
+ *
+ * @param verbose boolean
*/
public void setVerbose(boolean verbose) {
this.verbose = verbose;
@@ -158,6 +177,8 @@ public class PackagerResolver extends URLResolver {
/**
* Set whether to run ant with the -quiet flag. Default is false.
+ *
+ * @param quiet boolean
*/
public void setQuiet(boolean quiet) {
this.quiet = quiet;
@@ -165,6 +186,8 @@ public class PackagerResolver extends URLResolver {
/**
* Set whether to validate downloaded packager.xml files. Default is true.
+ *
+ * @param validate boolean
*/
public void setValidate(boolean validate) {
this.validate = validate;
@@ -185,7 +208,7 @@ public class PackagerResolver extends URLResolver {
/**
* Sets a property to be passed to the child Ant build responsible for packaging the dependency.
- *
+ *
* @param propertyKey
* the property to pass
* @param propertyValue
diff --git a/src/java/org/apache/ivy/plugins/version/VersionMatcher.java b/src/java/org/apache/ivy/plugins/version/VersionMatcher.java
index 41f95332..184b28e4 100644
--- a/src/java/org/apache/ivy/plugins/version/VersionMatcher.java
+++ b/src/java/org/apache/ivy/plugins/version/VersionMatcher.java
@@ -45,7 +45,7 @@ public interface VersionMatcher {
/**
* Indicates if the given asked ModuleRevisionId should be considered as dynamic for the current
* VersionMatcher or not.
- *
+ *
* @param askedMrid
* the dependency module revision id as asked by a module
* @return true if this revision is considered as a dynamic one, false otherwise
@@ -55,7 +55,7 @@ public interface VersionMatcher {
/**
* Indicates if this version matcher considers that the module revision found matches the asked
* one.
- *
+ *
* @param askedMrid ModuleRevisionId
* @param foundMrid ModuleRevisionId
* @return boolean
@@ -66,7 +66,9 @@ public interface VersionMatcher {
* Indicates if this VersionMatcher needs module descriptors to determine if a module revision
* matches the asked one. Note that returning true in this method may imply big performance
* issues.
- *
+ *
+ * @param askedMrid ModuleRevisionId
+ * @param foundMrid ModuleRevisionId
* @return boolean
*/
public boolean needModuleDescriptor(ModuleRevisionId askedMrid, ModuleRevisionId foundMrid);
@@ -76,7 +78,7 @@ public interface VersionMatcher {
* method can be called even needModuleDescriptor(ModuleRevisionId askedMrid, ModuleRevisionId
* foundMrid) returns false, so it is required to implement it in any case, a usual default
* implementation being: return accept(askedMrid, foundMD.getResolvedModuleRevisionId());
- *
+ *
* @param askedMrid ModuleRevisionId
* @param foundMD ModuleDescriptor
* @return boolean
@@ -88,7 +90,7 @@ public interface VersionMatcher {
* should be considered the greater. If there is not enough information to know which one is the
* greater, the dynamic one should be considered greater and this method should return 0. This
* method should never be called with a askedMrid for which isDynamic returns false.
- *
+ *
* @param askedMrid
* the dynamic revision to compare
* @param foundMrid
@@ -103,7 +105,7 @@ public interface VersionMatcher {
/**
* Returns the version matcher name identifying this version matcher
- *
+ *
* @return the version matcher name identifying this version matcher
*/
public String getName();
diff --git a/src/java/org/apache/ivy/util/FileUtil.java b/src/java/org/apache/ivy/util/FileUtil.java
index aca40072..c938007d 100644
--- a/src/java/org/apache/ivy/util/FileUtil.java
+++ b/src/java/org/apache/ivy/util/FileUtil.java
@@ -57,9 +57,9 @@ public final class FileUtil {
// Utility class
}
- // according to tests by users, 64kB seems to be a good value for the buffer used during copy
+ // according to tests by users, 64kB seems to be a good value for the buffer used during copy;
// further improvements could be obtained using NIO API
- private static final int BUFFER_SIZE = 64 * 1024;
+ private static final int BUFFER_SIZE = 64 * 1024;
private static final byte[] EMPTY_BUFFER = new byte[0];
@@ -67,13 +67,12 @@ public final class FileUtil {
public static void symlinkInMass(Map destToSrcMap, boolean overwrite)
throws IOException {
-
- // This pattern could be more forgiving if somebody wanted it to be...
- // ...but this should satisfy 99+% of all needs, without letting unsafe operations be done.
+ // This pattern could be more forgiving if somebody wanted it to be... but this should
+ // satisfy 99+% of all needs, without letting unsafe operations be done.
// If you paths is not supported, you then skip this mass option.
// NOTE: A space inside the path is allowed (I can't control other programmers who like them
- // in their working directory names)...
- // but trailing spaces on file names will be checked otherwise and refused.
+ // in their working directory names)... but trailing spaces on file names will be checked
+ // otherwise and refused.
try {
StringBuffer sb = new StringBuffer();
@@ -456,10 +455,14 @@ public final class FileUtil {
/**
* Returns a list of Files composed of all directories being parent of file and child of root +
- * file and root themselves. Example: getPathFiles(new File("test"), new
- * File("test/dir1/dir2/file.txt")) => {new File("test/dir1"), new File("test/dir1/dir2"), new
- * File("test/dir1/dir2/file.txt") } Note that if root is not an ancestor of file, or if root is
- * null, all directories from the file system root will be returned.
+ * file and root themselves. Example: getPathFiles(new File("test"), new
+ * File("test/dir1/dir2/file.txt")) => {new File("test/dir1"), new File("test/dir1/dir2"),
+ * new File("test/dir1/dir2/file.txt") } Note that if root is not an ancestor of file, or
+ * if root is null, all directories from the file system root will be returned.
+ *
+ * @param root File
+ * @param file File
+ * @return List<File>
*/
public static List getPathFiles(File root, File file) {
List ret = new ArrayList();
@@ -475,15 +478,13 @@ public final class FileUtil {
}
/**
- * Returns a collection of all Files being contained in the given directory, recursively,
- * including directories.
- *
* @param dir
* The directory from which all files, including files in subdirectory) are
* extracted.
* @param ignore
* a Collection of filenames which must be excluded from listing
- * @return A collection containing all the files of the given directory and it's subdirectories.
+ * @return a collection containing all the files of the given directory and it's subdirectories,
+ * recursively.
*/
public static Collection listAll(File dir, Collection ignore) {
return listAll(dir, new ArrayList(), ignore);
@@ -534,12 +535,9 @@ public final class FileUtil {
* Unlike {@link File#getCanonicalPath()} this method specifically does not resolve symbolic
* links.
*
- * @param path
- * the path to be normalized.
+ * @param path the path to be normalized.
* @return the normalized version of the path.
- *
- * @throws java.lang.NullPointerException
- * if path is null.
+ * @throws NullPointerException if path is null.
*/
public static File normalize(final String path) {
Stack s = new Stack();
@@ -577,21 +575,20 @@ public final class FileUtil {
/**
* Dissect the specified absolute path.
*
- * @param path
- * the path to dissect.
+ * @param path the path to dissect.
* @return String[] {root, remaining path}.
- * @throws java.lang.NullPointerException
- * if path is null.
+ * @throws NullPointerException if path is null.
* @since Ant 1.7
*/
private static String[] dissect(String path) {
char sep = File.separatorChar;
path = path.replace('/', sep).replace('\\', sep);
- // // make sure we are dealing with an absolute path
- // if (!isAbsolutePath(path)) {
- // throw new BuildException(path + " is not an absolute path");
- // }
+ /* // make sure we are dealing with an absolute path
+ * if (!isAbsolutePath(path)) {
+ * throw new BuildException(path + " is not an absolute path");
+ * }
+ */
String root = null;
int colon = path.indexOf(':');
if (colon > 0) { // && (ON_DOS || ON_NETWARE)) {
@@ -627,8 +624,8 @@ public final class FileUtil {
/**
* Get the length of the file, or the sum of the children lengths if it is a directory
*
- * @param file
- * @return
+ * @param file File
+ * @return long
*/
public static long getFileLength(File file) {
long l = 0;
diff --git a/src/java/org/apache/ivy/util/StringUtils.java b/src/java/org/apache/ivy/util/StringUtils.java
index 11518722..01f31dc1 100644
--- a/src/java/org/apache/ivy/util/StringUtils.java
+++ b/src/java/org/apache/ivy/util/StringUtils.java
@@ -47,8 +47,7 @@ public final class StringUtils {
* will try to be as precise as possible, handling cases where e.getMessage() is not meaningful,
* like {@link NullPointerException} for instance.
*
- * @param t
- * the throwable to get the error message from
+ * @param t the throwable to get the error message from
* @return the error message of the given exception
*/
public static String getErrorMessage(Throwable t) {
@@ -89,7 +88,7 @@ public final class StringUtils {
* Example:
*
*
- * join(new String[] {"one", "two", "three"}, ", ") -> "one, two, three"
+ * join(new String[] {"one", "two", "three"}, ", ") -> "one, two, three"
*
*
* @param objs
@@ -110,7 +109,9 @@ public final class StringUtils {
}
// basic string codec (same algo as CVS passfile, inspired by ant CVSPass class
- /** Array contain char conversion data */
+ /**
+ * Array containing char conversion data
+ */
private static final char[] SHIFTS = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 114, 120, 53, 79, 96, 109,
72, 108, 70, 64, 76, 67, 116, 74, 68, 87, 111, 52, 75, 119, 49, 34, 82, 81, 95, 65,
@@ -130,7 +131,7 @@ public final class StringUtils {
* Encrypt the given string in a way which anybody having access to this method algorithm can
* easily decrypt. This is useful only to avoid clear string storage in a file for example, but
* shouldn't be considered as a real mean of security. This only works with simple characters
- * (char < 256).
+ * (char < 256).
*
* @param str
* the string to encrypt
diff --git a/src/java/org/apache/ivy/util/XMLHelper.java b/src/java/org/apache/ivy/util/XMLHelper.java
index 78d691e5..894ccc85 100644
--- a/src/java/org/apache/ivy/util/XMLHelper.java
+++ b/src/java/org/apache/ivy/util/XMLHelper.java
@@ -95,6 +95,9 @@ public abstract class XMLHelper {
/**
* Convert an URL to a valid systemId according to RFC 2396.
+ *
+ * @param url URL
+ * @return String
*/
public static String toSystemId(URL url) {
try {
@@ -105,9 +108,9 @@ public abstract class XMLHelper {
}
// IMPORTANT: validation errors are only notified to the given handler, and
- // do not cause exception
- // implement warning error and fatalError methods in handler to be informed
- // of validation errors
+ // do not cause exception implement warning error and fatalError methods in
+ // handler to be informed of validation errors
+
public static void parse(URL xmlURL, URL schema, DefaultHandler handler) throws SAXException,
IOException, ParserConfigurationException {
parse(xmlURL, schema, handler, null);
@@ -177,12 +180,12 @@ public abstract class XMLHelper {
/**
* Escapes invalid XML characters in the given character data using XML entities. For the
- * moment, only the following characters are being escaped: (<), (&), (') and (").
- *
- * Remark: we don't escape the (>) character to keep the readability of the configuration
- * mapping! The XML spec only requires that the (&) and (<) characters are being escaped inside
- * character data.
- *
+ * moment, only the following characters are being escaped: (<), (&), (') and (").
+ *
+ * Remark: we don't escape the (>) character to keep the readability of the configuration
+ * mapping! The XML spec only requires that the (&) and (<) characters are being escaped
+ * inside character data.
+ *
* @param text
* the character data to escape
* @return the escaped character data
diff --git a/src/java/org/apache/ivy/util/filter/FilterHelper.java b/src/java/org/apache/ivy/util/filter/FilterHelper.java
index 9e79e130..a665a002 100644
--- a/src/java/org/apache/ivy/util/filter/FilterHelper.java
+++ b/src/java/org/apache/ivy/util/filter/FilterHelper.java
@@ -54,19 +54,19 @@ public final class FilterHelper {
}
/**
- * Returns a new collection containing only the items from the given collection, which are
- * accepted by the filter.
- *
+ * @param The type parameter
* @param col
* The collection to filter.
* @param filter
* The filter to use.
- * @return A new collection instance containing the only the instance accepted by the filter.
+ * @return a new collection instance containing the only the the items from the given
+ * collection, which are accepted by the filter.
*
- *
- * Comment: We could have used
- * Commons-Collections
- * facility for this. If we accepted to add dependencies on third party jars.
+ *
+ * Comment: We could have used
+ * Commons Collections facility for
+ * this, if we accepted additional dependencies on third party jars.
+ *
*/
public static Collection filter(Collection col, Filter filter) {
if (filter == null) {
diff --git a/src/java/org/apache/ivy/util/url/URLHandler.java b/src/java/org/apache/ivy/util/url/URLHandler.java
index 96b51d91..b429ef91 100644
--- a/src/java/org/apache/ivy/util/url/URLHandler.java
+++ b/src/java/org/apache/ivy/util/url/URLHandler.java
@@ -83,48 +83,44 @@ public interface URLHandler {
/**
* Please prefer getURLInfo when several infos are needed.
- *
- * @param url
- * the url to check
+ *
+ * @param url the url to check
* @return true if the target is reachable
*/
public boolean isReachable(URL url);
/**
* Please prefer getURLInfo when several infos are needed.
- *
- * @param url
- * the url to check
+ *
+ * @param url the url to check
+ * @param timeout the timeout in milliseconds
* @return true if the target is reachable
*/
public boolean isReachable(URL url, int timeout);
/**
- * Returns the length of the target if the given url is reachable, and without error code in
- * case of http urls. Please prefer getURLInfo when several infos are needed.
- *
- * @param url
- * the url to check
- * @return the length of the target if available, 0 if not reachable
+ * Please prefer getURLInfo when several infos are needed.
+ *
+ * @param url the url to check
+ * @return the length of the target if the given url is reachable, 0 otherwise. No error code in
+ * case of http urls.
*/
public long getContentLength(URL url);
/**
- * Returns the length of the target if the given url is reachable, and without error code in
- * case of http urls.
- *
* @param url
* the url to check
* @param timeout
- * the maximum time before considering an url is not reachable a timeout of zero
- * indicates no timeout
- * @return the length of the target if available, 0 if not reachable
+ * the maximum time before considering an url is not reachable a
+ * timeout of zero indicates no timeout
+ * @return the length of the target if the given url is reachable, 0 otherwise. No error code in
+ * case of http urls.
*/
public long getContentLength(URL url, int timeout);
/**
* Please prefer getURLInfo when several infos are needed.
- *
+ *
* @param url
* the url to check
* @return last modified timestamp of the given url
@@ -133,33 +129,28 @@ public interface URLHandler {
/**
* Please prefer getURLInfo when several infos are needed.
- *
- * @param url
- * the url to check
+ *
+ * @param url the url to check
+ * @param timeout the timeout in milliseconds
* @return last modified timestamp of the given url
*/
public long getLastModified(URL url, int timeout);
/**
- * Returns the URLInfo of the given url or a {@link #UNAVAILABLE} instance, if the url is not
- * reachable.
- *
* @param url
* The url from which information is retrieved.
- * @return The URLInfo extracted from the given url, or {@link #UNAVAILABLE} when the url is not
- * available.
+ * @return The URLInfo extracted from the given url, or {@link #UNAVAILABLE} instance when the
+ * url is not reachable.
*/
public URLInfo getURLInfo(URL url);
/**
- * never returns null, return UNAVAILABLE when url is not reachable
- *
* @param url
* The url from which information is retrieved.
* @param timeout
* The timeout in milliseconds.
* @return The URLInfo extracted from the given url, or {@link #UNAVAILABLE} when the url is not
- * available.
+ * reachable, never null.
*/
public URLInfo getURLInfo(URL url, int timeout);
diff --git a/src/java/org/apache/ivy/util/url/URLHandlerRegistry.java b/src/java/org/apache/ivy/util/url/URLHandlerRegistry.java
index 8bffe976..cd78811a 100644
--- a/src/java/org/apache/ivy/util/url/URLHandlerRegistry.java
+++ b/src/java/org/apache/ivy/util/url/URLHandlerRegistry.java
@@ -39,7 +39,7 @@ public final class URLHandlerRegistry {
/**
* This method is used to get appropriate http downloader depending on Jakarta Commons
* HttpClient availability in classpath, or simply use jdk url handling in other cases.
- *
+ *
* @return most accurate http downloader
*/
public static URLHandler getHttp() {