Class Name

  • All Implemented Interfaces:
    Serializable

    public class Name
    extends Object
    implements Serializable
    A convenience class for names and converting between Names and their string representation
    Author:
    Gerald Brose, FU Berlin
    See Also:
    Serialized Form
    • Constructor Detail

      • Name

        public Name()
      • Name

        public Name​(org.omg.CosNaming.NameComponent[] n)
             throws org.omg.CosNaming.NamingContextPackage.InvalidName
        create a name from an array of NameComponents
        Throws:
        org.omg.CosNaming.NamingContextPackage.InvalidName
      • Name

        public Name​(String string_name)
             throws org.omg.CosNaming.NamingContextPackage.InvalidName
        create a name from a stringified name
        Throws:
        org.omg.CosNaming.NamingContextPackage.InvalidName
      • Name

        public Name​(org.omg.CosNaming.NameComponent n)
             throws org.omg.CosNaming.NamingContextPackage.InvalidName
        create a name from a singleNameComponent
        Throws:
        org.omg.CosNaming.NamingContextPackage.InvalidName
    • Method Detail

      • baseNameComponent

        public org.omg.CosNaming.NameComponent baseNameComponent()
        Returns:
        a NameComponent object representing the unstructured base name of this structured name
      • components

        public org.omg.CosNaming.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
      • fullName

        public Name fullName()
                      throws org.omg.CosNaming.NamingContextPackage.InvalidName
        Throws:
        org.omg.CosNaming.NamingContextPackage.InvalidName
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • toString

        public String toString()
        Overrides:
        toString in class Object
        Returns:
        the string representation of this name
      • toName

        public static org.omg.CosNaming.NameComponent[] toName​(String sn)
                                                        throws org.omg.CosNaming.NamingContextPackage.InvalidName
        Returns:
        an a array of NameComponents
        Throws:
        org.omg.CosNaming.NamingContextPackage.InvalidName
      • toString

        public static String toString​(org.omg.CosNaming.NameComponent[] n)
                               throws org.omg.CosNaming.NamingContextPackage.InvalidName
        Returns:
        the string representation of this NameComponent array
        Throws:
        org.omg.CosNaming.NamingContextPackage.InvalidName