hudson.maven
Class ModuleName

java.lang.Object
  extended by hudson.maven.ModuleName
All Implemented Interfaces:
Serializable, Comparable<ModuleName>

public class ModuleName
extends Object
implements Comparable<ModuleName>, Serializable

Version independent name of a Maven project. GroupID+artifactId.

Author:
Kohsuke Kawaguchi
See Also:
ModuleDependency, Serialized Form

Field Summary
 String artifactId
           
 String groupId
           
 
Constructor Summary
ModuleName(org.apache.maven.model.Dependency dep)
           
ModuleName(org.apache.maven.execution.ExecutionEvent event)
           
ModuleName(org.apache.maven.model.Extension ext)
           
ModuleName(org.apache.maven.project.MavenProject project)
           
ModuleName(org.apache.maven.model.Plugin plugin)
           
ModuleName(org.apache.maven.model.ReportPlugin plugin)
           
ModuleName(String groupId, String artifactId)
           
 
Method Summary
 int compareTo(ModuleName that)
           
 boolean equals(Object o)
           
static ModuleName fromFileSystemName(String n)
           
static ModuleName fromString(String n)
           
 int hashCode()
           
static boolean isValid(String n)
          Checks if the given name is valid module name string format created by toString().
 String toFileSystemName()
          Returns the "groupId$artifactId" form, which is safe for the use as a file name, unlike toString().
 String toString()
          Returns the "groupId:artifactId" form.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

groupId

public final String groupId

artifactId

public final String artifactId
Constructor Detail

ModuleName

public ModuleName(String groupId,
                  String artifactId)

ModuleName

public ModuleName(org.apache.maven.execution.ExecutionEvent event)

ModuleName

public ModuleName(org.apache.maven.project.MavenProject project)

ModuleName

public ModuleName(org.apache.maven.model.Plugin plugin)

ModuleName

public ModuleName(org.apache.maven.model.ReportPlugin plugin)

ModuleName

public ModuleName(org.apache.maven.model.Extension ext)

ModuleName

public ModuleName(org.apache.maven.model.Dependency dep)
Method Detail

toString

public String toString()
Returns the "groupId:artifactId" form.

Overrides:
toString in class Object

toFileSystemName

public String toFileSystemName()
Returns the "groupId$artifactId" form, which is safe for the use as a file name, unlike toString().


fromFileSystemName

public static ModuleName fromFileSystemName(String n)

fromString

public static ModuleName fromString(String n)

isValid

public static boolean isValid(String n)
Checks if the given name is valid module name string format created by toString().


equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(ModuleName that)
Specified by:
compareTo in interface Comparable<ModuleName>


Copyright © 2004-2013. All Rights Reserved.