KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > naming > core > NameParserImpl


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.naming.core;
18
19 import javax.naming.NameParser JavaDoc;
20 import javax.naming.Name JavaDoc;
21 import javax.naming.NamingException JavaDoc;
22 import javax.naming.CompositeName JavaDoc;
23
24 /**
25  * Parses names.
26  *
27  * @author Remy Maucherat
28  * @version $Revision: 1.2 $ $Date: 2004/02/24 08:58:08 $
29  */

30 public class NameParserImpl
31     implements NameParser JavaDoc
32 {
33
34
35     // ----------------------------------------------------- Instance Variables
36

37
38     // ----------------------------------------------------- NameParser Methods
39

40
41     /**
42      * Parses a name into its components.
43      *
44      * @param name The non-null string name to parse
45      * @return A non-null parsed form of the name using the naming convention
46      * of this parser.
47      */

48     public Name JavaDoc parse(String JavaDoc name)
49         throws NamingException JavaDoc {
50         return new CompositeName JavaDoc(name);
51     }
52
53 // public Name parse( String name ) throws NamingException
54
// {
55
// return new CompoundName( name, syntax );
56
// }
57

58 // public Properties getSyntax()
59
// {
60
// return syntax;
61
// }
62

63 // static Properties syntax = new Properties();
64

65 // static
66
// {
67
// syntax.put("jndi.syntax.direction", "left_to_right");
68
// syntax.put("jndi.syntax.separator", "/");
69
// syntax.put("jndi.syntax.ignorecase", "false");
70
// }
71

72
73 }
74
75
Popular Tags