public AbstractParser getOrRegister(Class<?> type) {
        AbstractParser parser = parserMap.get(type);
        if(parser == null) {
            synchronized(parserMap) {
                parser = parserMap.get(type);
                if(parser == null) {
                    try {
                        Class<?> target = buildClass(new GeneratorContext(this, header), type);
                        parser = (AbstractParser) target.getConstructor(JSONPool.class).newInstance(this);
                        parserMap.put(type, parser);
                    } catch (Exception e) {
                        System.out.println("Error build parser class : " + type + " cause by " + e.getMessage());
                        e.printStackTrace();
                    }
                }
            }
        }
        return parser;
    }