org.jacorb.naming

Class Name

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.12 2004/05/06 12:39:59 nicolas Exp $

Author:
Gerald Brose, FU Berlin

See Also:
Serialized Form

Constructor Summary

Name()
Name(String string_name)
create a name from a stringified name
Name(NameComponent n)
create a name from an array of NameComponents
Name(NameComponent n)
create a name from a singleNameComponent

Method Summary

NameComponent
baseNameComponent()
NameComponent[]
components()
Name
ctxName()
boolean
equals(Object obj)
Name
fullName()
int
hashCode()
String
kind()
static NameComponent[]
toName(String sn)
String
toString()
static String
toString(NameComponent n)

Constructor Details

Name

public Name()


Name

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

Parameters:


Name

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

Parameters:


Name

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

Parameters:

Method Details

baseNameComponent

public NameComponent baseNameComponent()

Returns:
a NameComponent object representing the unstructured base name of this structured name


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(Object obj)


fullName

public Name fullName()
            throws InvalidName


hashCode

public int hashCode()


kind

public String kind()


toName

public static NameComponent[] toName(String sn)
            throws InvalidName

Returns:
an a array of NameComponents

Throws:
InvalidName -


toString

public String toString()

Returns:
the string representation of this name


toString

public static String toString(NameComponent n)
            throws InvalidName

Returns:
the string representation of this NameComponent array