Java 类com.alibaba.fastjson.parser.deserializer.ParseProcess 实例源码

项目:boohee_v5.6    文件:JSON.java   
public static final <T> T parseObject(String input, Type clazz, ParserConfig config, ParseProcess processor, int featureValues, Feature... features) {
    if (input == null) {
        return null;
    }
    for (Feature featrue : features) {
        featureValues = Feature.config(featureValues, featrue, true);
    }
    DefaultJSONParser parser = new DefaultJSONParser(input, config, featureValues);
    if (processor instanceof ExtraTypeProvider) {
        parser.getExtraTypeProviders().add((ExtraTypeProvider) processor);
    }
    if (processor instanceof ExtraProcessor) {
        parser.getExtraProcessors().add((ExtraProcessor) processor);
    }
    T value = parser.parseObject(clazz);
    parser.handleResovleTask(value);
    parser.close();
    return value;
}
项目:GitHub    文件:JSON.java   
@SuppressWarnings("unchecked")
public static <T> T parseObject(String input, Type clazz, ParserConfig config, ParseProcess processor,
                                      int featureValues, Feature... features) {
    if (input == null) {
        return null;
    }

    if (features != null) {
        for (Feature feature : features) {
            featureValues |= feature.mask;
        }
    }

    DefaultJSONParser parser = new DefaultJSONParser(input, config, featureValues);

    if (processor != null) {
        if (processor instanceof ExtraTypeProvider) {
            parser.getExtraTypeProviders().add((ExtraTypeProvider) processor);
        }

        if (processor instanceof ExtraProcessor) {
            parser.getExtraProcessors().add((ExtraProcessor) processor);
        }

        if (processor instanceof FieldTypeResolver) {
            parser.setFieldTypeResolver((FieldTypeResolver) processor);
        }
    }

    T value = (T) parser.parseObject(clazz, null);

    parser.handleResovleTask(value);

    parser.close();

    return (T) value;
}
项目:uavstack    文件:JSON.java   
@SuppressWarnings("unchecked")
public static final <T> T parseObject(String input, Type clazz, ParserConfig config, ParseProcess processor,
                                      int featureValues, Feature... features) {
    if (input == null) {
        return null;
    }

    for (Feature featrue : features) {
        featureValues = Feature.config(featureValues, featrue, true);
    }

    DefaultJSONParser parser = new DefaultJSONParser(input, config, featureValues);

    if (processor instanceof ExtraTypeProvider) {
        parser.getExtraTypeProviders().add((ExtraTypeProvider) processor);
    }

    if (processor instanceof ExtraProcessor) {
        parser.getExtraProcessors().add((ExtraProcessor) processor);
    }

    T value = (T) parser.parseObject(clazz);

    parser.handleResovleTask(value);

    parser.close();

    return (T) value;
}
项目:itmarry    文件:JSON.java   
@SuppressWarnings("unchecked")
public static final <T> T parseObject(String input, Type clazz, ParserConfig config, ParseProcess processor,
                                      int featureValues, Feature... features) {
    if (input == null) {
        return null;
    }

    for (Feature featrue : features) {
        featureValues = Feature.config(featureValues, featrue, true);
    }

    DefaultJSONParser parser = new DefaultJSONParser(input, config, featureValues);

    if (processor instanceof ExtraTypeProvider) {
        parser.getExtraTypeProviders().add((ExtraTypeProvider) processor);
    }

    if (processor instanceof ExtraProcessor) {
        parser.getExtraProcessors().add((ExtraProcessor) processor);
    }

    T value = (T) parser.parseObject(clazz);

    handleResovleTask(parser, value);

    parser.close();

    return (T) value;
}
项目:GitHub    文件:JSON.java   
@SuppressWarnings("unchecked")
public static <T> T parseObject(String text, Class<T> clazz, ParseProcess processor, Feature... features) {
    return (T) parseObject(text, (Type) clazz, ParserConfig.global, processor, DEFAULT_PARSER_FEATURE,
                           features);
}
项目:GitHub    文件:JSON.java   
@SuppressWarnings("unchecked")
public static <T> T parseObject(String input, Type clazz, ParseProcess processor, Feature... features) {
    return (T) parseObject(input, clazz, ParserConfig.global, processor, DEFAULT_PARSER_FEATURE, features);
}
项目:boohee_v5.6    文件:JSON.java   
public static final <T> T parseObject(String text, Class<T> clazz, ParseProcess processor, Feature... features) {
    return parseObject(text, (Type) clazz, ParserConfig.getGlobalInstance(), processor, DEFAULT_PARSER_FEATURE, features);
}
项目:boohee_v5.6    文件:JSON.java   
public static final <T> T parseObject(String input, Type clazz, ParseProcess processor, Feature... features) {
    return parseObject(input, clazz, ParserConfig.getGlobalInstance(), DEFAULT_PARSER_FEATURE, features);
}
项目:uavstack    文件:JSON.java   
@SuppressWarnings("unchecked")
public static final <T> T parseObject(String text, Class<T> clazz, ParseProcess processor, Feature... features) {
    return (T) parseObject(text, (Type) clazz, ParserConfig.getGlobalInstance(), processor, DEFAULT_PARSER_FEATURE,
                           features);
}
项目:uavstack    文件:JSON.java   
@SuppressWarnings("unchecked")
public static final <T> T parseObject(String input, Type clazz, ParseProcess processor, Feature... features) {
    return (T) parseObject(input, clazz, ParserConfig.getGlobalInstance(), DEFAULT_PARSER_FEATURE, features);
}
项目:itmarry    文件:JSON.java   
@SuppressWarnings("unchecked")
public static final <T> T parseObject(String text, Class<T> clazz, ParseProcess processor, Feature... features) {
    return (T) parseObject(text, (Type) clazz, ParserConfig.getGlobalInstance(), processor, DEFAULT_PARSER_FEATURE,
                           features);
}
项目:itmarry    文件:JSON.java   
@SuppressWarnings("unchecked")
public static final <T> T parseObject(String input, Type clazz, ParseProcess processor, Feature... features) {
    return (T) parseObject(input, clazz, ParserConfig.getGlobalInstance(), DEFAULT_PARSER_FEATURE, features);
}