package org.huihoo.jfox.jndi;
import javax.naming.*;
import java.util.Properties;
public class NameParserImpl implements NameParser,java.io.Serializable {
private static Properties syntax = new Properties();
static {
syntax.setProperty("jndi.syntax.direction", "left_to_right");
syntax.setProperty("jndi.syntax.ignorecase", "false");
syntax.setProperty("jndi.syntax.separator", "/");
syntax.setProperty("jndi.syntax.trimblanks","true");
}
private static NameParserImpl me = new NameParserImpl();
private NameParserImpl() {
}
public Name parse(String name) throws NamingException {
return new CompoundName(name, syntax);
}
public static synchronized NameParserImpl getInstance() {
return me;
}
public static void main(String[] args) throws Exception {
System.out.println(me.parse("/").toString());
}
}