KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > naming > NameParser


1 /*
2  * @(#)NameParser.java 1.8 04/05/05
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.naming;
9
10 /**
11   * This interface is used for parsing names from a hierarchical
12   * namespace. The NameParser contains knowledge of the syntactic
13   * information (like left-to-right orientation, name separator, etc.)
14   * needed to parse names.
15   *
16   * The equals() method, when used to compare two NameParsers, returns
17   * true if and only if they serve the same namespace.
18   *
19   * @author Rosanna Lee
20   * @author Scott Seligman
21   * @version 1.8 04/05/05
22   *
23   * @see CompoundName
24   * @see Name
25   * @since 1.3
26   */

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 JavaDoc parse(String JavaDoc name) throws NamingException JavaDoc;
40 }
41
Popular Tags