Interface NameFactory

All Known Implementing Classes:
NameFactoryImpl, NameFactoryLogger

public interface NameFactory
NameFactory...
  • Method Summary

    Modifier and Type
    Method
    Description
    create(String nameString)
    Returns a Name holding the value of the specified string.
    create(String namespaceURI, String localName)
    Returns a Name with the given namespace URI and local part and validates the given parameters.
  • Method Details

    • create

      Name create(String namespaceURI, String localName) throws IllegalArgumentException
      Returns a Name with the given namespace URI and local part and validates the given parameters.
      Parameters:
      namespaceURI - namespace uri
      localName - local part
      Throws:
      IllegalArgumentException - if namespaceURI or localName is invalid.
    • create

      Name create(String nameString) throws IllegalArgumentException
      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

      Parameters:
      nameString - a String containing the Name representation to be parsed.
      Returns:
      the Name represented by the argument
      Throws:
      IllegalArgumentException - if the specified string can not be parsed as a Name.