Skip to content

Commit

Permalink
(doc) apply javadoc:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
slachiewicz committed Feb 13, 2021
1 parent 303d99b commit 616005a
Show file tree
Hide file tree
Showing 33 changed files with 276 additions and 146 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@

/**
* 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:markhobson@gmail.com">Mark Hobson</a>
*/
public abstract class AbstractStrictPatternArtifactFilter implements ArtifactFilter
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand All @@ -41,6 +43,8 @@ public PatternExcludesArtifactFilter( Collection<String> patterns )
}

/**
* <p>Constructor for PatternExcludesArtifactFilter.</p>
*
* @param patterns The pattern which will be used.
* @param actTransitively yes/no.
*/
Expand All @@ -62,13 +66,21 @@ public boolean include( Artifact artifact )
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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

/**
* TODO: include in maven-artifact in future
*
*
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
* @see StrictPatternIncludesArtifactFilter
*/
Expand All @@ -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 )
Expand All @@ -71,6 +73,8 @@ public PatternIncludesArtifactFilter( final Collection<String> patterns )
}

/**
* <p>Constructor for PatternIncludesArtifactFilter.</p>
*
* @param patterns The pattern to be used.
* @param actTransitively transitive yes/no.
*/
Expand Down Expand Up @@ -142,6 +146,8 @@ public boolean include( final Artifact artifact )
}

/**
* <p>patternMatches.</p>
*
* @param artifact to check for.
* @return true if the match is true false otherwise.
*/
Expand Down Expand Up @@ -221,6 +227,8 @@ private Boolean match( char[][] gatvCharArray )
}

/**
* <p>addFilteredArtifact.</p>
*
* @param artifact add artifact to the filtered artifacts list.
*/
protected void addFilteredArtifact( final Artifact artifact )
Expand Down Expand Up @@ -257,13 +265,16 @@ public void reportMissedCriteria( final Logger logger )
}
}

/** {@inheritDoc} */
@Override
public String toString()
{
return "Includes filter:" + getPatternsAsString();
}

/**
* <p>getPatternsAsString.</p>
*
* @return pattern as a string.
*/
protected String getPatternsAsString()
Expand All @@ -278,6 +289,8 @@ protected String getPatternsAsString()
}

/**
* <p>getFilterDescription.</p>
*
* @return description.
*/
protected String getFilterDescription()
Expand All @@ -302,7 +315,11 @@ public void reportFilteredArtifacts( final Logger logger )
}
}

/** {@inheritDoc} */
/**
* {@inheritDoc}
*
* @return a boolean.
*/
public boolean hasMissedCriteria()
{
// if there are no patterns, there is nothing to report.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -79,7 +79,7 @@ public 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 )
Expand Down Expand Up @@ -164,6 +164,8 @@ else if ( Artifact.SCOPE_SYSTEM.equals( artifact.getScope() ) )
}

/**
* <p>toString.</p>
*
* @return Information converted to a string.
*/
public String toString()
Expand Down Expand Up @@ -235,7 +237,11 @@ public void reportMissedCriteria( Logger logger )
}
}

/** {@inheritDoc} */
/**
* {@inheritDoc}
*
* @return a boolean.
*/
public boolean hasMissedCriteria()
{
boolean report = false;
Expand Down Expand Up @@ -269,6 +275,8 @@ public boolean hasMissedCriteria()
}

/**
* <p>isIncludeCompileScope.</p>
*
* @return {@link #includeCompileScope}
*/
public boolean isIncludeCompileScope()
Expand All @@ -277,8 +285,10 @@ public boolean isIncludeCompileScope()
}

/**
* <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 )
{
Expand All @@ -288,6 +298,8 @@ public ScopeArtifactFilter setIncludeCompileScope( boolean pIncludeCompileScope
}

/**
* <p>isIncludeRuntimeScope.</p>
*
* @return {@link #includeRuntimeScope}
*/
public boolean isIncludeRuntimeScope()
Expand All @@ -296,8 +308,10 @@ public boolean isIncludeRuntimeScope()
}

/**
* <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 )
{
Expand All @@ -307,6 +321,8 @@ public ScopeArtifactFilter setIncludeRuntimeScope( boolean pIncludeRuntimeScope
}

/**
* <p>isIncludeTestScope.</p>
*
* @return {@link #includeTestScope}
*/
public boolean isIncludeTestScope()
Expand All @@ -315,8 +331,10 @@ public boolean isIncludeTestScope()
}

/**
* <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 )
{
Expand All @@ -326,6 +344,8 @@ public ScopeArtifactFilter setIncludeTestScope( boolean pIncludeTestScope )
}

/**
* <p>isIncludeProvidedScope.</p>
*
* @return {@link #includeProvidedScope}
*/
public boolean isIncludeProvidedScope()
Expand All @@ -334,6 +354,8 @@ public boolean isIncludeProvidedScope()
}

/**
* <p>Setter for the field <code>includeProvidedScope</code>.</p>
*
* @param pIncludeProvidedScope yes/no.
* @return {@link #ScopeArtifactFilter()}
*/
Expand All @@ -345,14 +367,21 @@ public ScopeArtifactFilter setIncludeProvidedScope( boolean pIncludeProvidedScop
}

/**
* <p>isIncludeSystemScope.</p>
*
* @return {@link #includeSystemScope}
*/
public boolean isIncludeSystemScope()
{
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;
Expand All @@ -362,15 +391,15 @@ public ScopeArtifactFilter setIncludeSystemScope( boolean pIncludeSystemScope )

/**
* Manages the following scopes:
*
*
* <ul>
* <li>system</li>
* <li>provided</li>
* <li>compile</li>
* </ul>
*
* @param enabled whether specified scopes should be included
* @return this instance
* @return this instance
*/
public ScopeArtifactFilter setIncludeCompileScopeWithImplications( boolean enabled )
{
Expand All @@ -383,14 +412,14 @@ public ScopeArtifactFilter setIncludeCompileScopeWithImplications( boolean enabl

/**
* 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 )
{
Expand All @@ -402,7 +431,7 @@ public ScopeArtifactFilter setIncludeRuntimeScopeWithImplications( boolean enabl

/**
* Manages the following scopes:
*
*
* <ul>
* <li>system</li>
* <li>provided</li>
Expand All @@ -412,7 +441,7 @@ public ScopeArtifactFilter setIncludeRuntimeScopeWithImplications( boolean enabl
* </ul>
*
* @param enabled whether specified scopes should be included
* @return this instance
* @return this instance
*/
public ScopeArtifactFilter setIncludeTestScopeWithImplications( boolean enabled )
{
Expand All @@ -429,7 +458,7 @@ public ScopeArtifactFilter setIncludeTestScopeWithImplications( boolean enabled
* 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 )
{
Expand All @@ -441,7 +470,7 @@ public ScopeArtifactFilter setIncludeNullScope( boolean enable )
/**
* Reset hit counts and tracking of filtered artifacts, BUT NOT ENABLED SCOPES.
*
* @return this instance
* @return this instance
*/
public ScopeArtifactFilter reset()
{
Expand Down
Loading

0 comments on commit 616005a

Please sign in to comment.