org.universAAL.maven
Class FilteringVisitorSupport

Package class diagram package FilteringVisitorSupport
java.lang.Object
  extended by org.universAAL.maven.FilteringVisitorSupport
Direct Known Subclasses:
IndexingDependencyNodeVisitor, LaunchOrderDependencyNodeVisitor

public abstract class FilteringVisitorSupport
extends Object

This abstract class is a support for implementations of DependencyNodeVisitor which provides methods for: filtering, stringifying, remembering visited nodes. Class should be extended by implementation of DependencyNodeVisitor.

Author:
rotgier

Constructor Summary
FilteringVisitorSupport(org.apache.maven.plugin.logging.Log log)
          Constructor of FilteringVisitorSupport.
 
Method Summary
protected  org.apache.maven.plugin.logging.Log getLog()
          Gets the log object.
protected  Set<String> getVisited()
          Gets set of visited nodes.
protected  boolean isInScope(org.apache.maven.shared.dependency.tree.DependencyNode node)
          Check if DepdencyNode is in the scope.
static String stringify(org.apache.maven.artifact.Artifact artifact)
          Stringify Artifact to string a in a following way: groupId:artifactId:version.
protected  String stringify(org.apache.maven.shared.dependency.tree.DependencyNode node)
          Stringify DependencyNode to a string in a following way: groupId:artifactId:version.
protected  String stringifyNoVersion(org.apache.maven.artifact.Artifact artifact)
          Stringify Artifact to a string in a following way: groupId:artifactId.
protected  String stringifyNoVersion(org.apache.maven.shared.dependency.tree.DependencyNode node)
          Stringify DependencyNode to a string in a following way: groupId:artifactId.
protected  boolean wasVisited(org.apache.maven.shared.dependency.tree.DependencyNode node)
          Check if node was visited.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteringVisitorSupport

public FilteringVisitorSupport(org.apache.maven.plugin.logging.Log log)
Constructor of FilteringVisitorSupport.

Parameters:
log - object used for logging.
Method Detail

stringify

public static String stringify(org.apache.maven.artifact.Artifact artifact)
Stringify Artifact to string a in a following way: groupId:artifactId:version.

Parameters:
artifact - which should be stringified
Returns:
stringified artifact representation

stringify

protected final String stringify(org.apache.maven.shared.dependency.tree.DependencyNode node)
Stringify DependencyNode to a string in a following way: groupId:artifactId:version.

Parameters:
node - which should be stringified
Returns:
stringified node representation

stringifyNoVersion

protected final String stringifyNoVersion(org.apache.maven.artifact.Artifact artifact)
Stringify Artifact to a string in a following way: groupId:artifactId.

Parameters:
artifact - which should be stringified
Returns:
stringified artifact representation

stringifyNoVersion

protected final String stringifyNoVersion(org.apache.maven.shared.dependency.tree.DependencyNode node)
Stringify DependencyNode to a string in a following way: groupId:artifactId.

Parameters:
node - which should be stringified
Returns:
stringified node representation

wasVisited

protected final boolean wasVisited(org.apache.maven.shared.dependency.tree.DependencyNode node)
Check if node was visited.

Parameters:
node - which should be checked for being visited
Returns:
true is node was visited

isInScope

protected final boolean isInScope(org.apache.maven.shared.dependency.tree.DependencyNode node)
Check if DepdencyNode is in the scope. Currently COMPILE and RUNTIME scope are taken into account.

Parameters:
node - which should be checked for being in scope
Returns:
true if node is in scope

getLog

protected final org.apache.maven.plugin.logging.Log getLog()
Gets the log object.

Returns:
the log object.

getVisited

protected final Set<String> getVisited()
Gets set of visited nodes. Each node is in stringified representation.

Returns:
set of visited nodess


Copyright © 2014 universAAL Consortium. All Rights Reserved.