@Test public void acceptTestMoreToken() { NodeBuilder builder = new NodeBuilder(); builder.groupId( "com.example.test" ).artifactId( "testArtifact" ).ext( "jar" ).version( "1.0.3" ); DependencyNode node = builder.build(); assertEquals( "com.example.test:testArtifact:jar:1.0.3:foo", false, accept( node, "com.example.test:testArtifact:jar:1.0.3:foo" ) ); }
public boolean accept( final DependencyNode node, List<DependencyNode> parents ) { final Dependency dependency = node.getDependency(); if ( dependency == null ) { return true; } final Artifact artifact = dependency.getArtifact(); for ( final String pattern : patterns ) { final boolean matched = accept( artifact, pattern ); if ( matched ) { return true; } } return false; }
PatternInclusionsDependencyFilter implements DependencyFilter { public boolean accept( final DependencyNode node, List<DependencyNode> parents ) { final Dependency dependency = node.getDependency(); if ( dependency == null ) { return true; } final Artifact artifact = dependency.getArtifact(); for ( final String pattern : patterns ) { final boolean matched = accept( artifact, pattern ); if ( matched ) { return true; } } return false; } }
PatternInclusionsDependencyFilter implements DependencyFilter { public boolean accept( final DependencyNode node, List<DependencyNode> parents ) { final Dependency dependency = node.getDependency(); if ( dependency == null ) { return true; } final Artifact artifact = dependency.getArtifact(); for ( final String pattern : patterns ) { final boolean matched = accept( artifact, pattern ); if ( matched ) { return true; } } return false; } PatternInclusionsDependencyFilter( final String... patterns );  PatternInclusionsDependencyFilter( final VersionScheme versionScheme, final String... patterns );  PatternInclusionsDependencyFilter( final Collection<String> patterns );  PatternInclusionsDependencyFilter( final VersionScheme versionScheme, final Collection<String> patterns ); }
PatternInclusionsDependencyFilter implements DependencyFilter { public boolean accept( final DependencyNode node, List<DependencyNode> parents ) { final Dependency dependency = node.getDependency(); if ( dependency == null ) { return true; } final Artifact artifact = dependency.getArtifact(); for ( final String pattern : patterns ) { final boolean matched = accept( artifact, pattern ); if ( matched ) { return true; } } return false; } PatternInclusionsDependencyFilter( final String... patterns );  PatternInclusionsDependencyFilter( final VersionScheme versionScheme, final String... patterns );  PatternInclusionsDependencyFilter( final Collection<String> patterns );  PatternInclusionsDependencyFilter( final VersionScheme versionScheme, final Collection<String> patterns ); boolean accept( final DependencyNode node, List<DependencyNode> parents ); @Override boolean equals( final Object obj ); @Override int hashCode(); }
PatternInclusionsDependencyFilter implements DependencyFilter { public boolean accept( final DependencyNode node, List<DependencyNode> parents ) { final Dependency dependency = node.getDependency(); if ( dependency == null ) { return true; } final Artifact artifact = dependency.getArtifact(); for ( final String pattern : patterns ) { final boolean matched = accept( artifact, pattern ); if ( matched ) { return true; } } return false; } PatternInclusionsDependencyFilter( final String... patterns );  PatternInclusionsDependencyFilter( final VersionScheme versionScheme, final String... patterns );  PatternInclusionsDependencyFilter( final Collection<String> patterns );  PatternInclusionsDependencyFilter( final VersionScheme versionScheme, final Collection<String> patterns ); boolean accept( final DependencyNode node, List<DependencyNode> parents ); @Override boolean equals( final Object obj ); @Override int hashCode();  }