田源
2024-03-07 4b4083fd73dc27ece42f4835483565eef0e4f608
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.vci.common.qt.object;
 
import com.vci.common.qt.interfaces.IParserFactory;
 
public class ParserHelper {
    
    private static IParserFactory _factory = null;
    
    public static IParserFactory getParserFactory() {
        if (_factory != null)
            return _factory;
        
        String sParserFactoryClass = "com.vci.server.oq.parsers.ParserFactory";
        try {
            _factory = (IParserFactory)Class.forName(sParserFactoryClass).newInstance();
            
            return _factory;
        } catch (InstantiationException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        
        return null;
    }
}