Class NameFactoryImpl

  • All Implemented Interfaces:
    NameFactory

    public class NameFactoryImpl
    extends java.lang.Object
    implements NameFactory
    NameFactoryImpl...
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Name create​(java.lang.String nameString)
      Returns a Name holding the value of the specified string.
      Name create​(java.lang.String namespaceURI, java.lang.String localName)
      Returns a Name with the given namespace URI and local part and validates the given parameters.
      static NameFactory getInstance()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getInstance

        public static NameFactory getInstance()
      • create

        public Name create​(java.lang.String namespaceURI,
                           java.lang.String localName)
                    throws java.lang.IllegalArgumentException
        Description copied from interface: NameFactory
        Returns a Name with the given namespace URI and local part and validates the given parameters.
        Specified by:
        create in interface NameFactory
        Parameters:
        namespaceURI - namespace uri
        localName - local part
        Throws:
        java.lang.IllegalArgumentException - if namespaceURI or localName is invalid.
        See Also:
        NameFactory.create(String, String)
      • create

        public Name create​(java.lang.String nameString)
                    throws java.lang.IllegalArgumentException
        Description copied from interface: NameFactory
        Returns a Name holding the value of the specified string. The string must be in the format returned by the Name.toString() method, i.e.

        {namespaceURI}localName

        Specified by:
        create in interface NameFactory
        Parameters:
        nameString - a String containing the Name representation to be parsed.
        Returns:
        the Name represented by the argument
        Throws:
        java.lang.IllegalArgumentException - if the specified string can not be parsed as a Name.
        See Also:
        NameFactory.create(String)