Created
August 15, 2011 12:22
-
-
Save joserodolfofreitas/1146122 to your computer and use it in GitHub Desktop.
gathering api info for review and discuss.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A filter which accept all dependencies. This is the default behavior is no | |
* other filter is specified. | |
*/ | |
public enum AcceptAllFilter implements MavenResolutionFilter | |
{ | |
/* | |
* (non-Javadoc) | |
* | |
* @see | |
* org.jboss.shrinkwrap.resolver.maven.MavenResolutionFilter#configure(java | |
* .util.Collection) | |
*/ | |
public MavenResolutionFilter configure(Collection<MavenDependency> dependencies); | |
/* | |
* (non-Javadoc) | |
* | |
* @see | |
* org.jboss.shrinkwrap.resolver.maven.MavenResolutionFilter#accept(org.jboss | |
* .shrinkwrap.resolver.maven.MavenResolutionElement) | |
*/ | |
public boolean accept(MavenDependency element); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A combinator for multiple filters. | |
* | |
*/ | |
public class CombinedFilter implements MavenResolutionFilter | |
{ | |
private List<MavenResolutionFilter> filters; | |
/** | |
* Combines multiple filters in a such way that all must pass. | |
* | |
* Implementation note: The varargs arguments cannot have a type bound, | |
* because this leads to an unchecked cast while invoked | |
* | |
* @param filters The filters to be combined | |
* @throws DependencyException If any of the filter cannot be used to filter | |
* MavenDependencies | |
* @see MavenBuilderImpl | |
*/ | |
public CombinedFilter(MavenResolutionFilter... filters); | |
/* | |
* (non-Javadoc) | |
* | |
* @see | |
* org.jboss.shrinkwrap.resolver.maven.MavenResolutionFilter#configure(java | |
* .util.Collection) | |
*/ | |
public MavenResolutionFilter configure(Collection<MavenDependency> dependencies); | |
public boolean accept(MavenDependency element); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A filter which limits scope of the artifacts. Only the artifacts within | |
* specified scopes are included in resolution. | |
* | |
* | |
*/ | |
public class ScopeFilter implements MavenResolutionFilter | |
{ | |
/** | |
* Creates a filter which accepts all artifacts with no scope defined, that | |
* is their scope is an empty string. | |
*/ | |
public ScopeFilter(); | |
/** | |
* Creates a filter which accepts all artifacts that their scope is one of | |
* the specified. | |
* | |
* @param scopes The enumeration of allowed scopes | |
*/ | |
public ScopeFilter(String... scopes); | |
/* | |
* (non-Javadoc) | |
* | |
* @see | |
* org.jboss.shrinkwrap.resolver.maven.MavenResolutionFilter#configure(java | |
* .util.Collection) | |
*/ | |
public MavenResolutionFilter configure(Collection<MavenDependency> dependencies); | |
public boolean accept(MavenDependency dependency); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
** | |
* A filter which accepts only dependencies which are directly specified in the | |
* builder All transitive dependencies are omitted. | |
* | |
*/ | |
public class StrictFilter implements MavenResolutionFilter | |
{ | |
/* | |
* (non-Javadoc) | |
* | |
* @see | |
* org.jboss.shrinkwrap.resolver.maven.MavenResolutionFilter#configure(java | |
* .util.Collection) | |
*/ | |
public MavenResolutionFilter configure(Collection<MavenDependency> dependencies); | |
public boolean accept(MavenDependency element); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment