hudson.ivy
Class ModuleName

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

public class ModuleName
extends java.lang.Object
implements java.lang.Comparable<ModuleName>, java.io.Serializable

Version independent name of an Ivy module.

Author:
Timothy Bingaman
See Also:
ModuleDependency, Serialized Form

Field Summary
 java.lang.String name
           
 java.lang.String organisation
           
 
Constructor Summary
ModuleName(org.apache.ivy.core.module.descriptor.DependencyDescriptor dep)
           
ModuleName(org.apache.ivy.core.module.descriptor.ModuleDescriptor module)
           
ModuleName(java.lang.String organisation, java.lang.String name)
           
 
Method Summary
 int compareTo(ModuleName that)
           
 boolean equals(java.lang.Object o)
           
static ModuleName fromFileSystemName(java.lang.String n)
           
static ModuleName fromString(java.lang.String n)
           
 int hashCode()
           
static boolean isValid(java.lang.String n)
          Checks if the given name is valid module name string format created by toString().
 java.lang.String toFileSystemName()
          Returns the "organisation$name" form, which is safe for the use as a file name, unlike toString().
 java.lang.String toString()
          Returns the "organization:name" form.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

organisation

public final java.lang.String organisation

name

public final java.lang.String name
Constructor Detail

ModuleName

public ModuleName(java.lang.String organisation,
                  java.lang.String name)

ModuleName

public ModuleName(org.apache.ivy.core.module.descriptor.ModuleDescriptor module)

ModuleName

public ModuleName(org.apache.ivy.core.module.descriptor.DependencyDescriptor dep)
Method Detail

toString

public java.lang.String toString()
Returns the "organization:name" form.

Overrides:
toString in class java.lang.Object

toFileSystemName

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


fromFileSystemName

public static ModuleName fromFileSystemName(java.lang.String n)

fromString

public static ModuleName fromString(java.lang.String n)

isValid

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


equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

compareTo

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


Copyright © 2010. All Rights Reserved.