This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-common-artifact-filters.git
commit 616005a50e59284345737249b9077de2d822e203 Author: Sylwester Lachiewicz <slachiew...@apache.org> AuthorDate: Sat Feb 13 22:04:03 2021 +0100 (doc) apply javadoc:fix --- .../AbstractStrictPatternArtifactFilter.java | 10 ++-- .../filter/PatternExcludesArtifactFilter.java | 16 +++++- .../filter/PatternIncludesArtifactFilter.java | 21 +++++++- .../artifact/filter/ScopeArtifactFilter.java | 59 ++++++++++++++++------ .../filter/StatisticsReportingArtifactFilter.java | 8 ++- .../StrictPatternExcludesArtifactFilter.java | 4 +- .../StrictPatternIncludesArtifactFilter.java | 4 +- .../collection/AbstractArtifactFeatureFilter.java | 19 +++++-- .../filter/collection/AbstractArtifactsFilter.java | 8 ++- .../filter/collection/ArtifactFilterException.java | 10 +++- .../filter/collection/ArtifactIdFilter.java | 5 +- .../collection/ArtifactTransitivityFilter.java | 4 +- .../filter/collection/ArtifactsFilter.java | 14 +++-- .../filter/collection/ClassifierFilter.java | 4 ++ .../filter/collection/FilterArtifacts.java | 16 ++++-- .../artifact/filter/collection/GroupIdFilter.java | 6 ++- .../collection/ProjectTransitivityFilter.java | 13 +++-- .../artifact/filter/collection/ScopeFilter.java | 20 +++++--- .../artifact/filter/collection/TypeFilter.java | 6 ++- .../artifact/filter/resolve/AbstractFilter.java | 11 ++-- .../shared/artifact/filter/resolve/AndFilter.java | 15 +++--- .../artifact/filter/resolve/ExclusionsFilter.java | 13 ++--- .../artifact/filter/resolve/FilterTransformer.java | 23 ++++----- .../maven/shared/artifact/filter/resolve/Node.java | 4 +- .../shared/artifact/filter/resolve/OrFilter.java | 15 +++--- .../filter/resolve/PatternExclusionsFilter.java | 13 +++-- .../filter/resolve/PatternInclusionsFilter.java | 15 +++--- .../artifact/filter/resolve/ScopeFilter.java | 28 +++++----- .../filter/resolve/TransformableFilter.java | 6 +-- .../ArtifactIncludeFilterTransformer.java | 19 ++++--- .../resolve/transform/ArtifactIncludeNode.java | 3 +- .../transform/EclipseAetherFilterTransformer.java | 9 +++- .../resolve/transform/EclipseAetherNode.java | 1 + 33 files changed, 276 insertions(+), 146 deletions(-) diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/AbstractStrictPatternArtifactFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/AbstractStrictPatternArtifactFilter.java index 24b2304..5f2f56d 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/AbstractStrictPatternArtifactFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/AbstractStrictPatternArtifactFilter.java @@ -29,19 +29,19 @@ import java.util.List; /** * Filter to include or exclude artifacts from a list of patterns. The artifact pattern syntax is of the form: - * + * * <pre>[groupId]:[artifactId]:[type]:[version]</pre> - * + * * <p> * Where each pattern segment is optional and supports full and partial <code>*</code> wildcards. An empty pattern * segment is treated as an implicit wildcard. * </p> - * + * * <p> * For example, <code>org.apache.*</code> would match all artifacts whose group id started with * <code>org.apache.</code>, and <code>:::*-SNAPSHOT</code> would match all snapshot artifacts. * </p> - * + * * @author <a href="mailto:markhob...@gmail.com">Mark Hobson</a> */ public abstract class AbstractStrictPatternArtifactFilter implements ArtifactFilter @@ -63,7 +63,7 @@ public abstract class AbstractStrictPatternArtifactFilter implements ArtifactFil /** * Creates a new filter that matches the specified artifact patterns and includes or excludes them according to the * specified flag. - * + * * @param patterns * the list of artifact patterns to match, as described above * @param include diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/PatternExcludesArtifactFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/PatternExcludesArtifactFilter.java index a55cb2a..a78469a 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/PatternExcludesArtifactFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/PatternExcludesArtifactFilter.java @@ -33,6 +33,8 @@ public class PatternExcludesArtifactFilter extends PatternIncludesArtifactFilter { /** + * <p>Constructor for PatternExcludesArtifactFilter.</p> + * * @param patterns The pattern to be used. */ public PatternExcludesArtifactFilter( Collection<String> patterns ) @@ -41,6 +43,8 @@ public class PatternExcludesArtifactFilter } /** + * <p>Constructor for PatternExcludesArtifactFilter.</p> + * * @param patterns The pattern which will be used. * @param actTransitively yes/no. */ @@ -62,13 +66,21 @@ public class PatternExcludesArtifactFilter return shouldInclude; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + * + * @return a {@link java.lang.String} object. + */ protected String getFilterDescription() { return "artifact exclusion filter"; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + * + * @return a {@link java.lang.String} object. + */ public String toString() { return "Excludes filter:" + getPatternsAsString(); diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/PatternIncludesArtifactFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/PatternIncludesArtifactFilter.java index 6cfb68f..48489bf 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/PatternIncludesArtifactFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/PatternIncludesArtifactFilter.java @@ -40,7 +40,7 @@ import org.codehaus.plexus.logging.Logger; /** * TODO: include in maven-artifact in future - * + * * @author <a href="mailto:br...@apache.org">Brett Porter</a> * @see StrictPatternIncludesArtifactFilter */ @@ -63,6 +63,8 @@ public class PatternIncludesArtifactFilter private final List<Artifact> filteredArtifact = new ArrayList<>(); /** + * <p>Constructor for PatternIncludesArtifactFilter.</p> + * * @param patterns The pattern to be used. */ public PatternIncludesArtifactFilter( final Collection<String> patterns ) @@ -71,6 +73,8 @@ public class PatternIncludesArtifactFilter } /** + * <p>Constructor for PatternIncludesArtifactFilter.</p> + * * @param patterns The pattern to be used. * @param actTransitively transitive yes/no. */ @@ -142,6 +146,8 @@ public class PatternIncludesArtifactFilter } /** + * <p>patternMatches.</p> + * * @param artifact to check for. * @return true if the match is true false otherwise. */ @@ -221,6 +227,8 @@ public class PatternIncludesArtifactFilter } /** + * <p>addFilteredArtifact.</p> + * * @param artifact add artifact to the filtered artifacts list. */ protected void addFilteredArtifact( final Artifact artifact ) @@ -257,6 +265,7 @@ public class PatternIncludesArtifactFilter } } + /** {@inheritDoc} */ @Override public String toString() { @@ -264,6 +273,8 @@ public class PatternIncludesArtifactFilter } /** + * <p>getPatternsAsString.</p> + * * @return pattern as a string. */ protected String getPatternsAsString() @@ -278,6 +289,8 @@ public class PatternIncludesArtifactFilter } /** + * <p>getFilterDescription.</p> + * * @return description. */ protected String getFilterDescription() @@ -302,7 +315,11 @@ public class PatternIncludesArtifactFilter } } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + * + * @return a boolean. + */ public boolean hasMissedCriteria() { // if there are no patterns, there is nothing to report. diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/ScopeArtifactFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/ScopeArtifactFilter.java index 77c264c..7bdd6ba 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/ScopeArtifactFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/ScopeArtifactFilter.java @@ -66,7 +66,7 @@ public class ScopeArtifactFilter private final List<String> filteredArtifactIds = new ArrayList<>(); /** - * Constructor that is meant to be used with fine-grained manipulation to + * Constructor that is meant to be used with fine-grained manipulation to * enable/disable specific scopes using the associated mutator methods. */ public ScopeArtifactFilter() @@ -79,7 +79,7 @@ public class ScopeArtifactFilter * Constructor that uses the implied nature of Maven scopes to determine which * artifacts to include. For instance, 'test' scope implies compile, provided, and runtime, * while 'runtime' scope implies only compile. - * + * * @param scope the scope */ public ScopeArtifactFilter( String scope ) @@ -164,6 +164,8 @@ public class ScopeArtifactFilter } /** + * <p>toString.</p> + * * @return Information converted to a string. */ public String toString() @@ -235,7 +237,11 @@ public class ScopeArtifactFilter } } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + * + * @return a boolean. + */ public boolean hasMissedCriteria() { boolean report = false; @@ -269,6 +275,8 @@ public class ScopeArtifactFilter } /** + * <p>isIncludeCompileScope.</p> + * * @return {@link #includeCompileScope} */ public boolean isIncludeCompileScope() @@ -277,8 +285,10 @@ public class ScopeArtifactFilter } /** + * <p>Setter for the field <code>includeCompileScope</code>.</p> + * * @param pIncludeCompileScope true/false. - * @return {@link ScopeArtifactFilter} + * @return {@link org.apache.maven.shared.artifact.filter.ScopeArtifactFilter} */ public ScopeArtifactFilter setIncludeCompileScope( boolean pIncludeCompileScope ) { @@ -288,6 +298,8 @@ public class ScopeArtifactFilter } /** + * <p>isIncludeRuntimeScope.</p> + * * @return {@link #includeRuntimeScope} */ public boolean isIncludeRuntimeScope() @@ -296,8 +308,10 @@ public class ScopeArtifactFilter } /** + * <p>Setter for the field <code>includeRuntimeScope</code>.</p> + * * @param pIncludeRuntimeScope true/false - * @return {@link ScopeArtifactFilter} + * @return {@link org.apache.maven.shared.artifact.filter.ScopeArtifactFilter} */ public ScopeArtifactFilter setIncludeRuntimeScope( boolean pIncludeRuntimeScope ) { @@ -307,6 +321,8 @@ public class ScopeArtifactFilter } /** + * <p>isIncludeTestScope.</p> + * * @return {@link #includeTestScope} */ public boolean isIncludeTestScope() @@ -315,8 +331,10 @@ public class ScopeArtifactFilter } /** + * <p>Setter for the field <code>includeTestScope</code>.</p> + * * @param pIncludeTestScope {@link #includeTestScope} - * @return {@link ScopeArtifactFilter} + * @return {@link org.apache.maven.shared.artifact.filter.ScopeArtifactFilter} */ public ScopeArtifactFilter setIncludeTestScope( boolean pIncludeTestScope ) { @@ -326,6 +344,8 @@ public class ScopeArtifactFilter } /** + * <p>isIncludeProvidedScope.</p> + * * @return {@link #includeProvidedScope} */ public boolean isIncludeProvidedScope() @@ -334,6 +354,8 @@ public class ScopeArtifactFilter } /** + * <p>Setter for the field <code>includeProvidedScope</code>.</p> + * * @param pIncludeProvidedScope yes/no. * @return {@link #ScopeArtifactFilter()} */ @@ -345,6 +367,8 @@ public class ScopeArtifactFilter } /** + * <p>isIncludeSystemScope.</p> + * * @return {@link #includeSystemScope} */ public boolean isIncludeSystemScope() @@ -352,7 +376,12 @@ public class ScopeArtifactFilter return includeSystemScope; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + * + * @param pIncludeSystemScope a boolean. + * @return a {@link org.apache.maven.shared.artifact.filter.ScopeArtifactFilter} object. + */ public ScopeArtifactFilter setIncludeSystemScope( boolean pIncludeSystemScope ) { this.includeSystemScope = pIncludeSystemScope; @@ -362,7 +391,7 @@ public class ScopeArtifactFilter /** * Manages the following scopes: - * + * * <ul> * <li>system</li> * <li>provided</li> @@ -370,7 +399,7 @@ public class ScopeArtifactFilter * </ul> * * @param enabled whether specified scopes should be included - * @return this instance + * @return this instance */ public ScopeArtifactFilter setIncludeCompileScopeWithImplications( boolean enabled ) { @@ -383,14 +412,14 @@ public class ScopeArtifactFilter /** * Manages the following scopes: - * + * * <ul> * <li>compile</li> * <li>runtime</li> * </ul> * * @param enabled whether specified scopes should be included - * @return this instance + * @return this instance */ public ScopeArtifactFilter setIncludeRuntimeScopeWithImplications( boolean enabled ) { @@ -402,7 +431,7 @@ public class ScopeArtifactFilter /** * Manages the following scopes: - * + * * <ul> * <li>system</li> * <li>provided</li> @@ -412,7 +441,7 @@ public class ScopeArtifactFilter * </ul> * * @param enabled whether specified scopes should be included - * @return this instance + * @return this instance */ public ScopeArtifactFilter setIncludeTestScopeWithImplications( boolean enabled ) { @@ -429,7 +458,7 @@ public class ScopeArtifactFilter * Determine whether artifacts that have a null scope are included or excluded. * * @param enable whether null-scope should be included - * @return this instance + * @return this instance */ public ScopeArtifactFilter setIncludeNullScope( boolean enable ) { @@ -441,7 +470,7 @@ public class ScopeArtifactFilter /** * Reset hit counts and tracking of filtered artifacts, BUT NOT ENABLED SCOPES. * - * @return this instance + * @return this instance */ public ScopeArtifactFilter reset() { diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/StatisticsReportingArtifactFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/StatisticsReportingArtifactFilter.java index 497f081..b3e3429 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/StatisticsReportingArtifactFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/StatisticsReportingArtifactFilter.java @@ -22,22 +22,28 @@ package org.apache.maven.shared.artifact.filter; import org.codehaus.plexus.logging.Logger; /** - * + * StatisticsReportingArtifactFilter interface. */ public interface StatisticsReportingArtifactFilter { /** + * <p>reportMissedCriteria.</p> + * * @param logger the logger */ void reportMissedCriteria( Logger logger ); /** + * <p>reportFilteredArtifacts.</p> + * * @param logger the logger */ void reportFilteredArtifacts( Logger logger ); /** + * <p>hasMissedCriteria.</p> + * * @return {@code true} if missed criteria; {@code false} otherwise. */ boolean hasMissedCriteria(); diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/StrictPatternExcludesArtifactFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/StrictPatternExcludesArtifactFilter.java index 24fd5b1..a042b8f 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/StrictPatternExcludesArtifactFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/StrictPatternExcludesArtifactFilter.java @@ -24,7 +24,7 @@ import java.util.List; /** * Filter to exclude artifacts from a list of patterns. <code>AbstractStrictPatternArtifactFilter</code> describes the * artifact pattern syntax. - * + * * @author <a href="mailto:markhob...@gmail.com">Mark Hobson</a> * @see AbstractStrictPatternArtifactFilter * @see PatternExcludesArtifactFilter @@ -34,7 +34,7 @@ public class StrictPatternExcludesArtifactFilter { /** * Creates a new filter that excludes artifacts that match the specified patterns. - * + * * @param patterns * the list of artifact patterns to match, as described above */ diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/StrictPatternIncludesArtifactFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/StrictPatternIncludesArtifactFilter.java index 0c8231e..5df722d 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/StrictPatternIncludesArtifactFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/StrictPatternIncludesArtifactFilter.java @@ -24,7 +24,7 @@ import java.util.List; /** * Filter to include artifacts from a list of patterns. <code>AbstractStrictPatternArtifactFilter</code> describes the * artifact pattern syntax. - * + * * @author <a href="mailto:markhob...@gmail.com">Mark Hobson</a> * @see AbstractStrictPatternArtifactFilter * @see PatternIncludesArtifactFilter @@ -34,7 +34,7 @@ public class StrictPatternIncludesArtifactFilter { /** * Creates a new filter that includes artifacts that match the specified patterns. - * + * * @param patterns * the list of artifact patterns to match, as described above */ diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/collection/AbstractArtifactFeatureFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/collection/AbstractArtifactFeatureFilter.java index 8bfa122..916ca23 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/collection/AbstractArtifactFeatureFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/collection/AbstractArtifactFeatureFilter.java @@ -30,7 +30,7 @@ import org.apache.maven.shared.utils.StringUtils; /** * This is the common base class of ClassifierFilter and TypeFilter - * + * * @author <a href="richa...@mxtelecom.com">Richard van der Hoff</a> */ public abstract class AbstractArtifactFeatureFilter @@ -45,6 +45,8 @@ public abstract class AbstractArtifactFeatureFilter private List<String> excludes; /** + * <p>Constructor for AbstractArtifactFeatureFilter.</p> + * * @param include comma separated list with includes. * @param exclude comma separated list with excludes. */ @@ -55,10 +57,9 @@ public abstract class AbstractArtifactFeatureFilter } /** + * {@inheritDoc} + * * This function determines if filtering needs to be performed. Includes are processed before Excludes. - * - * @param artifacts the set of dependencies to filter. - * @return a Set of filtered dependencies. */ public Set<Artifact> filter( Set<Artifact> artifacts ) { @@ -144,13 +145,15 @@ public abstract class AbstractArtifactFeatureFilter /** * Should return the type or classifier of the given artifact, so that we can filter it - * + * * @param artifact artifact to return type or classifier of * @return type or classifier */ protected abstract String getArtifactFeature( Artifact artifact ); /** + * <p>Setter for the field <code>excludes</code>.</p> + * * @param excludeString comma separated list with excludes. */ public void setExcludes( String excludeString ) @@ -162,6 +165,8 @@ public abstract class AbstractArtifactFeatureFilter } /** + * <p>Setter for the field <code>includes</code>.</p> + * * @param includeString comma separated list with includes. */ public void setIncludes( String includeString ) @@ -173,6 +178,8 @@ public abstract class AbstractArtifactFeatureFilter } /** + * <p>Getter for the field <code>excludes</code>.</p> + * * @return Returns the excludes. */ public List<String> getExcludes() @@ -181,6 +188,8 @@ public abstract class AbstractArtifactFeatureFilter } /** + * <p>Getter for the field <code>includes</code>.</p> + * * @return Returns the includes. */ public List<String> getIncludes() diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/collection/AbstractArtifactsFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/collection/AbstractArtifactsFilter.java index 04fb0a7..4a2fe78 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/collection/AbstractArtifactsFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/collection/AbstractArtifactsFilter.java @@ -25,16 +25,14 @@ import java.util.Set; import org.apache.maven.artifact.Artifact; /** + * <p>Abstract AbstractArtifactsFilter class.</p> + * * @author <a href="mailto:bri...@apache.org">Brian Fox</a> */ public abstract class AbstractArtifactsFilter implements ArtifactsFilter { - /** - * @param artifact {@link Artifact} - * @return {@code true} if artifact is includes {@code false} otherwise. - * @throws ArtifactFilterException when filtering fails - */ + /** {@inheritDoc} */ public boolean isArtifactIncluded( Artifact artifact ) throws ArtifactFilterException { diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactFilterException.java b/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactFilterException.java index 0f25099..0ff0592 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactFilterException.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactFilterException.java @@ -20,6 +20,8 @@ package org.apache.maven.shared.artifact.filter.collection; */ /** + * <p>ArtifactFilterException class.</p> + * * @author <a href="mailto:bri...@apache.org">Brian Fox</a> */ public class ArtifactFilterException @@ -39,6 +41,8 @@ public class ArtifactFilterException } /** + * <p>Constructor for ArtifactFilterException.</p> + * * @param theMessage The message which describes what happends. * @param theCause The cause. */ @@ -48,6 +52,8 @@ public class ArtifactFilterException } /** + * <p>Constructor for ArtifactFilterException.</p> + * * @param theMessage The message which describes what happends. */ public ArtifactFilterException( String theMessage ) @@ -56,7 +62,9 @@ public class ArtifactFilterException } /** - * @param theCause {@link Throwable} cause of the problem. + * <p>Constructor for ArtifactFilterException.</p> + * + * @param theCause {@link java.lang.Throwable} cause of the problem. */ public ArtifactFilterException( Throwable theCause ) { diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactIdFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactIdFilter.java index cb4c85f..ef44896 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactIdFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactIdFilter.java @@ -23,7 +23,7 @@ import org.apache.maven.artifact.Artifact; /** * Filter on ArtifactId name - * + * * @author clove * @since 2.0-alpha-2 */ @@ -32,7 +32,7 @@ public class ArtifactIdFilter { /** * Will setup super with 'ArtifactId' as the filterType - * + * * @param include comma separated list of artifactIds to include, may be {@code null} * @param exclude comma separated list of artifactIds to exclude, may be {@code null} */ @@ -41,6 +41,7 @@ public class ArtifactIdFilter super( include, exclude ); } + /** {@inheritDoc} */ @Override protected String getArtifactFeature( Artifact artifact ) { diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactTransitivityFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactTransitivityFilter.java index 74e50ca..e7747ce 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactTransitivityFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactTransitivityFilter.java @@ -86,9 +86,7 @@ public class ArtifactTransitivityFilter } } - /** - * {@inheritDoc} - */ + /** {@inheritDoc} */ public Set<Artifact> filter( Set<Artifact> artifacts ) { Set<Artifact> result = new LinkedHashSet<>(); diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactsFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactsFilter.java index 458f3a6..1d2e612 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactsFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactsFilter.java @@ -24,22 +24,28 @@ import java.util.Set; import org.apache.maven.artifact.Artifact; /** + * <p>ArtifactsFilter interface.</p> + * * @author <a href="mailto:bri...@apache.org">Brian Fox</a> */ public interface ArtifactsFilter { /** - * @param artifacts {@link Artifact} + * <p>filter.</p> + * + * @param artifacts {@link org.apache.maven.artifact.Artifact} * @return Set of artifacts. - * @throws ArtifactFilterException in case of a failure. + * @throws org.apache.maven.shared.artifact.filter.collection.ArtifactFilterException in case of a failure. */ Set<Artifact> filter( Set<Artifact> artifacts ) throws ArtifactFilterException; /** - * @param artifact {@link Artifact} + * <p>isArtifactIncluded.</p> + * + * @param artifact {@link org.apache.maven.artifact.Artifact} * @return {@code true} if artifact is included {@code false} otherwise. - * @throws ArtifactFilterException in case of a failure. + * @throws org.apache.maven.shared.artifact.filter.collection.ArtifactFilterException in case of a failure. */ boolean isArtifactIncluded( Artifact artifact ) throws ArtifactFilterException; diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/collection/ClassifierFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/collection/ClassifierFilter.java index b0d5140..fa58795 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/collection/ClassifierFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/collection/ClassifierFilter.java @@ -22,12 +22,16 @@ package org.apache.maven.shared.artifact.filter.collection; import org.apache.maven.artifact.Artifact; /** + * <p>ClassifierFilter class.</p> + * * @author <a href="mailto:bri...@apache.org">Brian Fox</a> */ public class ClassifierFilter extends AbstractArtifactFeatureFilter { /** + * <p>Constructor for ClassifierFilter.</p> + * * @param include comma separated list with includes. * @param exclude comma separated list with excludes. */ diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/collection/FilterArtifacts.java b/src/main/java/org/apache/maven/shared/artifact/filter/collection/FilterArtifacts.java index 2d439e6..b2347c5 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/collection/FilterArtifacts.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/collection/FilterArtifacts.java @@ -26,6 +26,8 @@ import java.util.Set; import org.apache.maven.artifact.Artifact; /** + * <p>FilterArtifacts class.</p> + * * @author <a href="mailto:bri...@apache.org">Brian Fox</a> */ public class FilterArtifacts @@ -50,7 +52,7 @@ public class FilterArtifacts /** * Appends the specified element to the end of this list. - * + * * @param filter element to be appended to this list. */ public void addFilter( ArtifactsFilter filter ) @@ -64,7 +66,7 @@ public class FilterArtifacts /** * Inserts the specified element at the specified position in this list. Shifts the element currently at that * position (if any) and any subsequent elements to the right (adds one to their indices). - * + * * @param index at which index the specified filter is to be inserted. * @param filter the filter to be inserted. * @throws IndexOutOfBoundsException if index is out of range <code>(index < 0 || index > size())</code>. @@ -78,9 +80,11 @@ public class FilterArtifacts } /** - * @param artifacts The {@link Artifact}s to filter. + * <p>filter.</p> + * + * @param artifacts The {@link org.apache.maven.artifact.Artifact}s to filter. * @return The resulting artifacts set. - * @throws ArtifactFilterException in case of a failure. + * @throws org.apache.maven.shared.artifact.filter.collection.ArtifactFilterException in case of a failure. */ public Set<Artifact> filter( Set<Artifact> artifacts ) throws ArtifactFilterException @@ -103,6 +107,8 @@ public class FilterArtifacts } /** + * <p>Getter for the field <code>filters</code>.</p> + * * @return the filters. */ public List<ArtifactsFilter> getFilters() @@ -111,6 +117,8 @@ public class FilterArtifacts } /** + * <p>Setter for the field <code>filters</code>.</p> + * * @param filters The filters to set. */ public void setFilters( List<ArtifactsFilter> filters ) diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/collection/GroupIdFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/collection/GroupIdFilter.java index d0d2188..c4cd109 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/collection/GroupIdFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/collection/GroupIdFilter.java @@ -23,7 +23,7 @@ import org.apache.maven.artifact.Artifact; /** * Filter on GroupId Name. - * + * * @author clove * @since 2.0 */ @@ -33,7 +33,7 @@ public class GroupIdFilter /** * Construction will setup the super call with a filtertype of 'GroupId' - * + * * @param include comma separated list of groupIds to include, may be {@code null} * @param exclude comma separated list of groupIds to exclude, may be {@code null} */ @@ -42,12 +42,14 @@ public class GroupIdFilter super( include, exclude ); } + /** {@inheritDoc} */ @Override protected String getArtifactFeature( Artifact artifact ) { return artifact.getGroupId(); } + /** {@inheritDoc} */ @Override protected boolean compareFeatures( String lhs, String rhs ) { diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/collection/ProjectTransitivityFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/collection/ProjectTransitivityFilter.java index 7b5f6da..4db9e6d 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/collection/ProjectTransitivityFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/collection/ProjectTransitivityFilter.java @@ -25,6 +25,8 @@ import java.util.Set; import org.apache.maven.artifact.Artifact; /** + * <p>ProjectTransitivityFilter class.</p> + * * @author <a href="mailto:bri...@apache.org">Brian Fox</a> */ public class ProjectTransitivityFilter @@ -36,6 +38,8 @@ public class ProjectTransitivityFilter private final Set<Artifact> directDependencies; /** + * <p>Constructor for ProjectTransitivityFilter.</p> + * * @param directDependencies set of direct dependencies. * @param excludeTransitive {@code true} exclude transitive deps {@code false} otherwise. */ @@ -45,8 +49,7 @@ public class ProjectTransitivityFilter this.directDependencies = directDependencies; } - /** {@inheritDoc} - */ + /** {@inheritDoc} */ public Set<Artifact> filter( Set<Artifact> artifacts ) { // why not just take the directDependencies here? @@ -70,7 +73,7 @@ public class ProjectTransitivityFilter /** * Compares the artifact to the list of dependencies to see if it is directly included by this project - * + * * @param artifact representing the item to compare. * @return true if artifact is a direct dependency */ @@ -87,6 +90,8 @@ public class ProjectTransitivityFilter } /** + * <p>isExcludeTransitive.</p> + * * @return Returns the excludeTransitive. */ public boolean isExcludeTransitive() @@ -95,6 +100,8 @@ public class ProjectTransitivityFilter } /** + * <p>Setter for the field <code>excludeTransitive</code>.</p> + * * @param excludeTransitive The excludeTransitive to set. */ public void setExcludeTransitive( boolean excludeTransitive ) diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/collection/ScopeFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/collection/ScopeFilter.java index cb43dd5..f6b1435 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/collection/ScopeFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/collection/ScopeFilter.java @@ -28,6 +28,8 @@ import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter; import org.apache.maven.shared.utils.StringUtils; /** + * <p>ScopeFilter class.</p> + * * @author <a href="mailto:bri...@apache.org">Brian Fox</a> */ public class ScopeFilter @@ -39,6 +41,8 @@ public class ScopeFilter private String excludeScope; /** + * <p>Constructor for ScopeFilter.</p> + * * @param includeScope the scope to be included. * @param excludeScope the scope to be excluded. */ @@ -49,14 +53,10 @@ public class ScopeFilter } /** + * {@inheritDoc} + * * This function determines if filtering needs to be performed. Excludes are * ignored if Includes are used. - * - * @param artifacts - * the set of artifacts to filter. - * - * @return a Set of filtered artifacts. - * @throws ArtifactFilterException when there's an invalid included scope */ public Set<Artifact> filter( Set<Artifact> artifacts ) throws ArtifactFilterException @@ -155,6 +155,8 @@ public class ScopeFilter } /** + * <p>Getter for the field <code>includeScope</code>.</p> + * * @return Returns the includeScope. */ public String getIncludeScope() @@ -163,6 +165,8 @@ public class ScopeFilter } /** + * <p>Setter for the field <code>includeScope</code>.</p> + * * @param scope * The includeScope to set. */ @@ -172,6 +176,8 @@ public class ScopeFilter } /** + * <p>Getter for the field <code>excludeScope</code>.</p> + * * @return Returns the excludeScope. */ public String getExcludeScope() @@ -180,6 +186,8 @@ public class ScopeFilter } /** + * <p>Setter for the field <code>excludeScope</code>.</p> + * * @param scope * The excludeScope to set. */ diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/collection/TypeFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/collection/TypeFilter.java index 14a38bd..98ffac9 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/collection/TypeFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/collection/TypeFilter.java @@ -22,12 +22,16 @@ package org.apache.maven.shared.artifact.filter.collection; import org.apache.maven.artifact.Artifact; /** + * <p>TypeFilter class.</p> + * * @author <a href="mailto:bri...@apache.org">Brian Fox</a> -s */ + */ public class TypeFilter extends AbstractArtifactFeatureFilter { /** + * <p>Constructor for TypeFilter.</p> + * * @param include comma separated list with includes. * @param exclude comma separated list with excludes. */ diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/AbstractFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/AbstractFilter.java index a02c045..2e39e22 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/AbstractFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/AbstractFilter.java @@ -23,15 +23,14 @@ import java.util.List; /** * Abstract filter for custom implementations - * + * * @author Robert Scholte * @since 3.0 */ public abstract class AbstractFilter implements TransformableFilter { - /** {@inheritDoc} - */ + /** {@inheritDoc} */ @Override public final <T> T transform( FilterTransformer<T> transformer ) { @@ -39,8 +38,10 @@ public abstract class AbstractFilter implements TransformableFilter } /** - * @param node {@link Node} - * @param parents {@link Node}s. + * <p>accept.</p> + * + * @param node {@link org.apache.maven.shared.artifact.filter.resolve.Node} + * @param parents {@link org.apache.maven.shared.artifact.filter.resolve.Node}s. * @return {@code true} / {@code false} */ public abstract boolean accept( Node node, List<Node> parents ); diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/AndFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/AndFilter.java index 3ac97c5..7e92b34 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/AndFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/AndFilter.java @@ -24,10 +24,9 @@ import java.util.Collections; /** * A filter that combines zero or more other filters using a logical {@code AND}. - * + * * @author Robert Scholte * @since 3.0 - * * @see org.eclipse.aether.util.filter.AndDependencyFilter */ public class AndFilter @@ -36,8 +35,8 @@ public class AndFilter private final Collection<TransformableFilter> filters; /** - * The default constructor specifying a collection of filters which all must be matched. - * + * The default constructor specifying a collection of filters which all must be matched. + * * @param filters the filters, may not be {@code null} */ public AndFilter( Collection<TransformableFilter> filters ) @@ -47,8 +46,8 @@ public class AndFilter /** * Get the filters - * - * @return the filters, never {@code null} + * + * @return the filters, never {@code null} */ public Collection<TransformableFilter> getFilters() { @@ -56,9 +55,9 @@ public class AndFilter } /** + * {@inheritDoc} + * * Transform this filter to a tool specific implementation - * - * @param transformer the transformer, may not be {@code null} */ @Override public <T> T transform( FilterTransformer<T> transformer ) diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/ExclusionsFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/ExclusionsFilter.java index 9760bac..cec4a86 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/ExclusionsFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/ExclusionsFilter.java @@ -24,10 +24,9 @@ import java.util.Collections; /** * A simple filter to exclude artifacts based on either artifact id or group id and artifact id. - * + * * @author Robert Scholte * @since 3.0 - * * @see org.eclipse.aether.util.filter.ExclusionsDependencyFilter */ public class ExclusionsFilter @@ -36,8 +35,8 @@ public class ExclusionsFilter private final Collection<String> excludes; /** - * The default constructor specifying a collection of keys which must be excluded. - * + * The default constructor specifying a collection of keys which must be excluded. + * * @param excludes the keys to exclude, may not be {@code null} * @see org.apache.maven.artifact.Artifact#getDependencyConflictId() */ @@ -47,6 +46,8 @@ public class ExclusionsFilter } /** + * <p>Getter for the field <code>excludes</code>.</p> + * * @return The list of excludes. */ public final Collection<String> getExcludes() @@ -55,9 +56,9 @@ public class ExclusionsFilter } /** + * {@inheritDoc} + * * Transform this filter to a tool specific implementation - * - * @param transformer the transformer, may not be {@code null} */ @Override public <T> T transform( FilterTransformer<T> transformer ) diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/FilterTransformer.java b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/FilterTransformer.java index 8d65df9..7c77ccb 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/FilterTransformer.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/FilterTransformer.java @@ -21,10 +21,9 @@ package org.apache.maven.shared.artifact.filter.resolve; /** * Provide a mechanism to transform a Filter to a tool specific equivalent using the visitor pattern. - * For example: Aether has its own set of filters. - * - * @author Robert Scholte + * For example: Aether has its own set of filters. * + * @author Robert Scholte * @param <T> the tool specific filter * @since 3.0 */ @@ -32,15 +31,15 @@ public interface FilterTransformer<T> { /** * Transform the scopeFilter to T specific implementation - * - * @param scopeFilter the filter + * + * @param scopeFilter the filter * @return the transformed filter, never {@code null} */ T transform( ScopeFilter scopeFilter ); /** * Transform the andFilter to T specific implementation - * + * * @param andFilter the filter * @return the transformed filter, never {@code null} */ @@ -48,7 +47,7 @@ public interface FilterTransformer<T> /** * Transform the exclusionsFilter to T specific implementation - * + * * @param exclusionsFilter the filter * @return the transformed filter, never {@code null} */ @@ -56,7 +55,7 @@ public interface FilterTransformer<T> /** * Transform the orFilter to T specific implementation - * + * * @param orFilter the filter * @return the transformed filter, never {@code null} */ @@ -64,7 +63,7 @@ public interface FilterTransformer<T> /** * Transform the patternExclusionsFilter to T specific implementation - * + * * @param patternExclusionsFilter the filter * @return the transformed filter, never {@code null} */ @@ -72,15 +71,15 @@ public interface FilterTransformer<T> /** * Transform the paternInclusionsFilter to T specific implementation - * + * * @param patternInclusionsFilter the filter * @return the transformed filter, never {@code null} */ T transform( PatternInclusionsFilter patternInclusionsFilter ); /** - * Transform a custom filter to T specific implementation - * + * Transform a custom filter to T specific implementation + * * @param abstractFilter the filter * @return the transformed filter, never {@code null} */ diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/Node.java b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/Node.java index e8acf3c..d4e81b2 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/Node.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/Node.java @@ -21,13 +21,15 @@ package org.apache.maven.shared.artifact.filter.resolve; /** * Represents a node of a dependency graph - * + * * @author Robert Scholte * @since 3.0 */ public interface Node { /** + * <p>getDependency.</p> + * * @return {@link org.apache.maven.model.Dependency} */ org.apache.maven.model.Dependency getDependency(); diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/OrFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/OrFilter.java index bc9c78a..691a793 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/OrFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/OrFilter.java @@ -24,10 +24,9 @@ import java.util.Collections; /** * A filter that combines zero or more other filters using a logical {@code OR}. - * + * * @author Robert Scholte * @since 3.0 - * * @see org.eclipse.aether.util.filter.OrDependencyFilter */ public class OrFilter implements TransformableFilter @@ -36,8 +35,8 @@ public class OrFilter implements TransformableFilter private final Collection<TransformableFilter> filters; /** - * The default constructor specifying a collection of filters of which at least one must match. - * + * The default constructor specifying a collection of filters of which at least one must match. + * * @param filters the filters, may not be {@code null} */ public OrFilter( Collection<TransformableFilter> filters ) @@ -47,8 +46,8 @@ public class OrFilter implements TransformableFilter /** * Get the filters - * - * @return the filters, never {@code null} + * + * @return the filters, never {@code null} */ public Collection<TransformableFilter> getFilters() { @@ -56,9 +55,9 @@ public class OrFilter implements TransformableFilter } /** + * {@inheritDoc} + * * Transform this filter to a tool specific implementation - * - * @param transformer the transformer, may not be {@code null} */ @Override public <T> T transform( FilterTransformer<T> transformer ) diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/PatternExclusionsFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/PatternExclusionsFilter.java index f072a2e..8778f85 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/PatternExclusionsFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/PatternExclusionsFilter.java @@ -24,7 +24,7 @@ import java.util.Collections; /** * A simple filter to exclude artifacts from a list of patterns. The artifact pattern syntax is of the form: - * + * * <pre> * [groupId]:[artifactId]:[extension]:[version] * </pre> @@ -36,10 +36,9 @@ import java.util.Collections; * For example, <code>org.apache.*</code> would match all artifacts whose group id started with * <code>org.apache.</code> , and <code>:::*-SNAPSHOT</code> would match all snapshot artifacts. * </p> - * + * * @author Robert Scholte * @since 3.0 - * * @see org.eclipse.aether.util.filter.PatternExclusionsDependencyFilter * @see org.eclipse.aether.version.VersionScheme */ @@ -50,7 +49,7 @@ public class PatternExclusionsFilter implements TransformableFilter /** * The default constructor specifying a collection of pattern based keys which must be excluded. - * + * * @param excludes the excludes, must not be {@code null} */ public PatternExclusionsFilter( Collection<String> excludes ) @@ -60,7 +59,7 @@ public class PatternExclusionsFilter implements TransformableFilter /** * Get the excludes - * + * * @return the excluded keys, never {@code null} */ public final Collection<String> getExcludes() @@ -69,9 +68,9 @@ public class PatternExclusionsFilter implements TransformableFilter } /** + * {@inheritDoc} + * * Transform this filter to a tool specific implementation - * - * @param transformer the transformer, must not be {@code null} */ @Override public <T> T transform( FilterTransformer<T> transformer ) diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/PatternInclusionsFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/PatternInclusionsFilter.java index def075e..ca92cdb 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/PatternInclusionsFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/PatternInclusionsFilter.java @@ -24,7 +24,7 @@ import java.util.Collections; /** * A simple filter to include artifacts from a list of patterns. The artifact pattern syntax is of the form: - * + * * <pre> * [groupId]:[artifactId]:[extension]:[version] * [groupId]:[artifactId]:[extension]:[classifier]:[version] @@ -37,10 +37,9 @@ import java.util.Collections; * For example, <code>org.apache.*</code> would match all artifacts whose group id started with * <code>org.apache.</code> , and <code>:::*-SNAPSHOT</code> would match all snapshot artifacts. * </p> - * + * * @author Robert Scholte * @since 3.0 - * * @see org.eclipse.aether.util.filter.PatternInclusionsDependencyFilter * @see org.eclipse.aether.version.VersionScheme */ @@ -51,7 +50,7 @@ public class PatternInclusionsFilter implements TransformableFilter /** * The default constructor specifying a collection of pattern based keys which must be included. - * + * * @param includes the includes */ public PatternInclusionsFilter( Collection<String> includes ) @@ -61,8 +60,8 @@ public class PatternInclusionsFilter implements TransformableFilter /** * Get the includes - * - * @return the includes, + * + * @return the includes, */ public final Collection<String> getIncludes() { @@ -70,9 +69,9 @@ public class PatternInclusionsFilter implements TransformableFilter } /** + * {@inheritDoc} + * * Transform this filter to a tool specific implementation - * - * @param transformer the transformer, must not be {@code null} */ @Override public <T> T transform( FilterTransformer<T> transformer ) diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/ScopeFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/ScopeFilter.java index 1bc2cb4..fe874a0 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/ScopeFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/ScopeFilter.java @@ -25,10 +25,9 @@ import java.util.Collections; /** * Filter based on scope. <strong>Note:</strong> There's no logic for inherited scoped - * + * * @author Robert Scholte * @since 3.0 - * * @see org.eclipse.aether.util.filter.ScopeDependencyFilter */ public class ScopeFilter implements TransformableFilter @@ -38,7 +37,8 @@ public class ScopeFilter implements TransformableFilter private final Collection<String> included; /** - * + * <p>Constructor for ScopeFilter.</p> + * * @param included specific scopes to include or {@code null} to include all * @param excluded specific scopes to exclude or {@code null} to exclude none */ @@ -49,8 +49,8 @@ public class ScopeFilter implements TransformableFilter } /** - * Construct a ScopeFilter based on included scopes - * + * Construct a ScopeFilter based on included scopes + * * @param included the scopes to include, may be {@code null} * @return the filter, never {@code null} */ @@ -60,8 +60,8 @@ public class ScopeFilter implements TransformableFilter } /** - * Construct a ScopeFilter based on included scopes - * + * Construct a ScopeFilter based on included scopes + * * @param included the scopes to include, must not be {@code null} * @return the filter, never {@code null} */ @@ -72,7 +72,7 @@ public class ScopeFilter implements TransformableFilter /** * Construct a ScopeFilter based on excluded scopes - * + * * @param excluded the scopes to exclude, may be {@code null} * @return the filter, never {@code null} */ @@ -83,7 +83,7 @@ public class ScopeFilter implements TransformableFilter /** * Construct a ScopeFilter based on excluded scopes - * + * * @param excluded the scopes to exclude, must not be {@code null} * @return the filter, never {@code null} */ @@ -94,7 +94,7 @@ public class ScopeFilter implements TransformableFilter /** * Get the excluded scopes - * + * * @return the scopes to exclude, may be {@code null} */ public final Collection<String> getExcluded() @@ -104,7 +104,7 @@ public class ScopeFilter implements TransformableFilter /** * Get the included scopes - * + * * @return the scopes to include, may be {@code null} */ public final Collection<String> getIncluded() @@ -113,11 +113,9 @@ public class ScopeFilter implements TransformableFilter } /** + * {@inheritDoc} + * * Transform this filter to a tool specific implementation - * - * @param <T> The type to be used. - * @param transformer the transformer, must not be {@code null} - * @return T. */ public <T> T transform ( FilterTransformer<T> transformer ) { diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/TransformableFilter.java b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/TransformableFilter.java index 7f09b9b..0b71126 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/TransformableFilter.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/TransformableFilter.java @@ -20,8 +20,8 @@ package org.apache.maven.shared.artifact.filter.resolve; */ /** - * The element interface of the visitor pattern for transforming filters. - * + * The element interface of the visitor pattern for transforming filters. + * * @author Robert Scholte * @since 3.0 */ @@ -36,7 +36,7 @@ public interface TransformableFilter * return transformer.transform( this ); * } * </pre> - * + * * @param <T> the interface of the tool specific filter * @param transformer the tool specific transformer, may not be {@code null} * @return the transformed value, never {@code null} diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeFilterTransformer.java b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeFilterTransformer.java index c6c2cdb..12a42d7 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeFilterTransformer.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeFilterTransformer.java @@ -39,11 +39,11 @@ import org.apache.maven.shared.artifact.filter.resolve.ScopeFilter; import org.apache.maven.shared.artifact.filter.resolve.TransformableFilter; /** - * Makes it possible to use the TransformableFilters for Aether and as classic Maven ArtifactFilter. - * + * Makes it possible to use the TransformableFilters for Aether and as classic Maven ArtifactFilter. + * * <strong>Note:</strong> the {@link AndFilter} and {@link ExclusionsFilter} are transformed to {@link ArtifactFilter} * implementations of Maven Core - * + * * @author Robert Scholte * @since 3.0 */ @@ -56,10 +56,10 @@ public class ArtifactIncludeFilterTransformer implements FilterTransformer<Artif /** * Used by {@link #transform(ScopeFilter)} - * + * * When filtering on artifacts it is possible that the scope is unknown. * Decide if artifact should be included if its scope is {@code null}, default is {@code true} - * + * * @param includeNullScope set to {@code false} if {@code null}-scoped Artifacts should not be included */ public void setIncludeNullScope( boolean includeNullScope ) @@ -73,7 +73,7 @@ public class ArtifactIncludeFilterTransformer implements FilterTransformer<Artif * and the current artifact is a transitive dependency brought in by another artifact which matches an inclusion or * exclusion pattern, then the current artifact has the same inclusion/exclusion logic applied to it as well. * Default is {@code false} - * + * * @param actTransitivelyPattern set to {@code true} if this artifact should be included/excluded just like one of * its ancestors. */ @@ -82,6 +82,7 @@ public class ArtifactIncludeFilterTransformer implements FilterTransformer<Artif this.actTransitivelyPattern = actTransitivelyPattern; } + /** {@inheritDoc} */ @Override public ArtifactFilter transform( final ScopeFilter scopeFilter ) { @@ -122,6 +123,7 @@ public class ArtifactIncludeFilterTransformer implements FilterTransformer<Artif }; } + /** {@inheritDoc} */ @Override public AndArtifactFilter transform( AndFilter andFilter ) { @@ -135,12 +137,14 @@ public class ArtifactIncludeFilterTransformer implements FilterTransformer<Artif return filter; } + /** {@inheritDoc} */ @Override public ArtifactFilter transform( final ExclusionsFilter exclusionsFilter ) { return new ExcludesArtifactFilter( new ArrayList<>( exclusionsFilter.getExcludes() ) ); } + /** {@inheritDoc} */ @Override public ArtifactFilter transform( OrFilter orFilter ) { @@ -168,18 +172,21 @@ public class ArtifactIncludeFilterTransformer implements FilterTransformer<Artif }; } + /** {@inheritDoc} */ @Override public ArtifactFilter transform( PatternExclusionsFilter patternExclusionsFilter ) { return new PatternExcludesArtifactFilter( patternExclusionsFilter.getExcludes(), actTransitivelyPattern ); } + /** {@inheritDoc} */ @Override public ArtifactFilter transform( PatternInclusionsFilter patternInclusionsFilter ) { return new PatternIncludesArtifactFilter( patternInclusionsFilter.getIncludes(), actTransitivelyPattern ); } + /** {@inheritDoc} */ @Override public ArtifactFilter transform( final AbstractFilter filter ) { diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeNode.java b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeNode.java index 86806d6..2c8b7c5 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeNode.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeNode.java @@ -38,9 +38,10 @@ class ArtifactIncludeNode implements Node } /** + * {@inheritDoc} + * * Note: an artifact doesn't contain exclusion information, so it won't be available here. * When required switch to filtering based on Aether. - * * @see EclipseAetherNode */ @Override diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherFilterTransformer.java b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherFilterTransformer.java index 7272802..238a53f 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherFilterTransformer.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherFilterTransformer.java @@ -45,7 +45,7 @@ import org.eclipse.aether.util.filter.ScopeDependencyFilter; /** * FilterTransformer implementation for Eclipse Aether. - * + * * @author Robert Scholte * @since 3.0 */ @@ -58,6 +58,7 @@ public class EclipseAetherFilterTransformer */ private static final String GAE_C_V = "(.*:.*:.*):(.+)(:.*)"; + /** {@inheritDoc} */ @Override public AndDependencyFilter transform( AndFilter andFilter ) { @@ -69,12 +70,14 @@ public class EclipseAetherFilterTransformer return new AndDependencyFilter( filters ); } + /** {@inheritDoc} */ @Override public ExclusionsDependencyFilter transform( ExclusionsFilter filter ) { return new ExclusionsDependencyFilter( filter.getExcludes() ); } + /** {@inheritDoc} */ @Override public OrDependencyFilter transform( OrFilter orFilter ) { @@ -86,18 +89,21 @@ public class EclipseAetherFilterTransformer return new OrDependencyFilter( filters ); } + /** {@inheritDoc} */ @Override public ScopeDependencyFilter transform( ScopeFilter filter ) { return new ScopeDependencyFilter( filter.getIncluded(), filter.getExcluded() ); } + /** {@inheritDoc} */ @Override public DependencyFilter transform( PatternExclusionsFilter filter ) { return new PatternExclusionsDependencyFilter( filter.getExcludes() ); } + /** {@inheritDoc} */ @Override public DependencyFilter transform( PatternInclusionsFilter filter ) { @@ -116,6 +122,7 @@ public class EclipseAetherFilterTransformer return new PatternInclusionsDependencyFilter( filter.getIncludes() ); } + /** {@inheritDoc} */ @Override public DependencyFilter transform( final AbstractFilter filter ) { diff --git a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherNode.java b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherNode.java index 935c27f..eb6c973 100644 --- a/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherNode.java +++ b/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherNode.java @@ -44,6 +44,7 @@ class EclipseAetherNode implements Node this.node = node; } + /** {@inheritDoc} */ @Override public org.apache.maven.model.Dependency getDependency() {