1. /*
  2. * @(#)NameParser.java 1.4 00/02/02
  3. *
  4. * Copyright 1999, 2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package javax.naming;
  11. /**
  12. * This interface is used for parsing names from a hierarchical
  13. * namespace. The NameParser contains knowledge of the syntactic
  14. * information (like left-to-right orientation, name separator, etc.)
  15. * needed to parse names.
  16. *
  17. * The equals() method, when used to compare two NameParsers, returns
  18. * true if and only if they serve the same namespace.
  19. *
  20. * @author Rosanna Lee
  21. * @author Scott Seligman
  22. * @version 1.4 00/02/02
  23. *
  24. * @see CompoundName
  25. * @see Name
  26. * @since 1.3
  27. */
  28. public interface NameParser {
  29. /**
  30. * Parses a name into its components.
  31. *
  32. * @param name The non-null string name to parse.
  33. * @return A non-null parsed form of the name using the naming convention
  34. * of this parser.
  35. * @exception InvalidNameException If name does not conform to
  36. * syntax defined for the namespace.
  37. * @exception NamingException If a naming exception was encountered.
  38. */
  39. Name parse(String name) throws NamingException;
  40. }