org.jacorb.naming
Class Name

java.lang.Object
  extended byorg.jacorb.naming.Name
All Implemented Interfaces:
java.io.Serializable

public class Name
extends java.lang.Object
implements java.io.Serializable

A convenience class for names and converting between Names and their string representation

Version:
$Id: Name.java,v 1.10 2003/10/29 12:00:29 simon.mcqueen Exp $
Author:
Gerald Brose, FU Berlin
See Also:
Serialized Form

Constructor Summary
Name()
           
Name(NameComponent n)
          create a name from a singleNameComponent
Name(NameComponent[] n)
          create a name from an array of NameComponents
Name(java.lang.String string_name)
          create a name from a stringified name
 
Method Summary
 NameComponent baseNameComponent()
           
 NameComponent[] components()
           
 Name ctxName()
           
 boolean equals(java.lang.Object obj)
           
 Name fullName()
           
 int hashCode()
           
 java.lang.String kind()
           
static NameComponent[] toName(java.lang.String sn)
           
 java.lang.String toString()
           
static java.lang.String toString(NameComponent[] n)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Name

public Name()

Name

public Name(NameComponent[] n)
     throws InvalidName
create a name from an array of NameComponents


Name

public Name(java.lang.String string_name)
     throws InvalidName
create a name from a stringified name


Name

public Name(NameComponent n)
     throws InvalidName
create a name from a singleNameComponent

Method Detail

baseNameComponent

public NameComponent baseNameComponent()
Returns:
a NameComponent object representing the unstructured base name of this structured name

kind

public java.lang.String kind()

components

public NameComponent[] components()
Returns:
this name as an array of org.omg.CosNaming.NameComponent, neccessary for a number of operations on naming context

ctxName

public Name ctxName()
Returns:
a Name object representing the name of the enclosing context

equals

public boolean equals(java.lang.Object obj)

fullName

public Name fullName()
              throws InvalidName
Throws:
InvalidName

hashCode

public int hashCode()

toString

public java.lang.String toString()
Returns:
the string representation of this name

toName

public static NameComponent[] toName(java.lang.String sn)
                              throws InvalidName
Returns:
an a array of NameComponents
Throws:
InvalidName

toString

public static java.lang.String toString(NameComponent[] n)
                                 throws InvalidName
Returns:
the string representation of this NameComponent array
Throws:
InvalidName