Java 类org.yaml.snakeyaml.constructor.BaseConstructor 实例源码

项目:AndroidApktool    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 * 
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 * @param resolver
 *            Resolver to detect implicit type
 */
public Yaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions,
        Resolver resolver) {
    if (!constructor.isExplicitPropertyUtils()) {
        constructor.setPropertyUtils(representer.getPropertyUtils());
    } else if (!representer.isExplicitPropertyUtils()) {
        representer.setPropertyUtils(constructor.getPropertyUtils());
    }
    this.constructor = constructor;
    representer.setDefaultFlowStyle(dumperOptions.getDefaultFlowStyle());
    representer.setDefaultScalarStyle(dumperOptions.getDefaultScalarStyle());
    representer.getPropertyUtils().setAllowReadOnlyProperties(
            dumperOptions.isAllowReadOnlyProperties());
    representer.setTimeZone(dumperOptions.getTimeZone());
    this.representer = representer;
    this.dumperOptions = dumperOptions;
    this.resolver = resolver;
    this.name = "Yaml:" + System.identityHashCode(this);
}
项目:5zig-TIMV-Plugin    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 *
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 * @param loadingConfig
 *            LoadingConfig to control load behavior
 * @param resolver
 *            Resolver to detect implicit type
 */
public Yaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions,
        LoaderOptions loadingConfig, Resolver resolver) {
    if (!constructor.isExplicitPropertyUtils()) {
        constructor.setPropertyUtils(representer.getPropertyUtils());
    } else if (!representer.isExplicitPropertyUtils()) {
        representer.setPropertyUtils(constructor.getPropertyUtils());
    }
    this.constructor = constructor;
    this.constructor.setAllowDuplicateKeys(loadingConfig.isAllowDuplicateKeys());
    if (dumperOptions.getIndent() <= dumperOptions.getIndicatorIndent()) {
        throw new YAMLException("Indicator indent must be smaller then indent.");
    }
    representer.setDefaultFlowStyle(dumperOptions.getDefaultFlowStyle());
    representer.setDefaultScalarStyle(dumperOptions.getDefaultScalarStyle());
    representer.getPropertyUtils()
            .setAllowReadOnlyProperties(dumperOptions.isAllowReadOnlyProperties());
    representer.setTimeZone(dumperOptions.getTimeZone());
    this.representer = representer;
    this.dumperOptions = dumperOptions;
    this.loadingConfig = loadingConfig;
    this.resolver = resolver;
    this.name = "Yaml:" + System.identityHashCode(this);
}
项目:snake-yaml    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 * 
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 * @param resolver
 *            Resolver to detect implicit type
 */
public Yaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions,
        Resolver resolver) {
    if (!constructor.isExplicitPropertyUtils()) {
        constructor.setPropertyUtils(representer.getPropertyUtils());
    } else if (!representer.isExplicitPropertyUtils()) {
        representer.setPropertyUtils(constructor.getPropertyUtils());
    }
    this.constructor = constructor;
    representer.setDefaultFlowStyle(dumperOptions.getDefaultFlowStyle());
    representer.setDefaultScalarStyle(dumperOptions.getDefaultScalarStyle());
    representer.getPropertyUtils().setAllowReadOnlyProperties(
            dumperOptions.isAllowReadOnlyProperties());
    representer.setTimeZone(dumperOptions.getTimeZone());
    this.representer = representer;
    this.dumperOptions = dumperOptions;
    this.resolver = resolver;
    this.name = "Yaml:" + System.identityHashCode(this);
}
项目:SubServers-2    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 *
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 * @param loadingConfig
 *            LoadingConfig to control load behavior
 * @param resolver
 *            Resolver to detect implicit type
 */
public Yaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions,
        LoaderOptions loadingConfig, Resolver resolver) {
    if (!constructor.isExplicitPropertyUtils()) {
        constructor.setPropertyUtils(representer.getPropertyUtils());
    } else if (!representer.isExplicitPropertyUtils()) {
        representer.setPropertyUtils(constructor.getPropertyUtils());
    }
    this.constructor = constructor;
    this.constructor.setAllowDuplicateKeys(loadingConfig.isAllowDuplicateKeys());
    if (dumperOptions.getIndent() <= dumperOptions.getIndicatorIndent()) {
        throw new YAMLException("Indicator indent must be smaller then indent.");
    }
    representer.setDefaultFlowStyle(dumperOptions.getDefaultFlowStyle());
    representer.setDefaultScalarStyle(dumperOptions.getDefaultScalarStyle());
    representer.getPropertyUtils()
            .setAllowReadOnlyProperties(dumperOptions.isAllowReadOnlyProperties());
    representer.setTimeZone(dumperOptions.getTimeZone());
    this.representer = representer;
    this.dumperOptions = dumperOptions;
    this.loadingConfig = loadingConfig;
    this.resolver = resolver;
    this.name = "Yaml:" + System.identityHashCode(this);
}
项目:FastAsyncWorldedit    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 *
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 * @param resolver
 *            Resolver to detect implicit type
 */
public Yaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions,
            Resolver resolver) {
    if (!constructor.isExplicitPropertyUtils()) {
        constructor.setPropertyUtils(representer.getPropertyUtils());
    } else if (!representer.isExplicitPropertyUtils()) {
        representer.setPropertyUtils(constructor.getPropertyUtils());
    }
    this.constructor = constructor;
    representer.setDefaultFlowStyle(dumperOptions.getDefaultFlowStyle());
    representer.setDefaultScalarStyle(dumperOptions.getDefaultScalarStyle());
    representer.getPropertyUtils().setAllowReadOnlyProperties(
            dumperOptions.isAllowReadOnlyProperties());
    representer.setTimeZone(dumperOptions.getTimeZone());
    this.representer = representer;
    this.dumperOptions = dumperOptions;
    this.resolver = resolver;
    this.name = "Yaml:" + System.identityHashCode(this);
}
项目:snakeyaml    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 * 
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 * @param resolver
 *            Resolver to detect implicit type
 */
public Yaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions,
        Resolver resolver) {
    if (!constructor.isExplicitPropertyUtils()) {
        constructor.setPropertyUtils(representer.getPropertyUtils());
    } else if (!representer.isExplicitPropertyUtils()) {
        representer.setPropertyUtils(constructor.getPropertyUtils());
    }
    this.constructor = constructor;
    representer.setDefaultFlowStyle(dumperOptions.getDefaultFlowStyle());
    representer.setDefaultScalarStyle(dumperOptions.getDefaultScalarStyle());
    representer.getPropertyUtils().setAllowReadOnlyProperties(
            dumperOptions.isAllowReadOnlyProperties());
    representer.setTimeZone(dumperOptions.getTimeZone());
    this.representer = representer;
    this.dumperOptions = dumperOptions;
    this.resolver = resolver;
    this.name = "Yaml:" + System.identityHashCode(this);
}
项目:TestTheTeacher    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 * 
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 * @param resolver
 *            Resolver to detect implicit type
 */
public Yaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions,
        Resolver resolver) {
    if (!constructor.isExplicitPropertyUtils()) {
        constructor.setPropertyUtils(representer.getPropertyUtils());
    } else if (!representer.isExplicitPropertyUtils()) {
        representer.setPropertyUtils(constructor.getPropertyUtils());
    }
    this.constructor = constructor;
    representer.setDefaultFlowStyle(dumperOptions.getDefaultFlowStyle());
    representer.setDefaultScalarStyle(dumperOptions.getDefaultScalarStyle());
    representer.getPropertyUtils().setAllowReadOnlyProperties(
            dumperOptions.isAllowReadOnlyProperties());
    representer.setTimeZone(dumperOptions.getTimeZone());
    this.representer = representer;
    this.dumperOptions = dumperOptions;
    this.resolver = resolver;
    this.name = "Yaml:" + System.identityHashCode(this);
}
项目:org.openntf.domino    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them in different Threads.
 * 
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 * @param resolver
 *            Resolver to detect implicit type
 */
public Yaml(final BaseConstructor constructor, final Representer representer, final DumperOptions dumperOptions, final Resolver resolver) {
    if (!constructor.isExplicitPropertyUtils()) {
        constructor.setPropertyUtils(representer.getPropertyUtils());
    } else if (!representer.isExplicitPropertyUtils()) {
        representer.setPropertyUtils(constructor.getPropertyUtils());
    }
    this.constructor = constructor;
    representer.setDefaultFlowStyle(dumperOptions.getDefaultFlowStyle());
    representer.setDefaultScalarStyle(dumperOptions.getDefaultScalarStyle());
    representer.getPropertyUtils().setAllowReadOnlyProperties(dumperOptions.isAllowReadOnlyProperties());
    representer.setTimeZone(dumperOptions.getTimeZone());
    this.representer = representer;
    this.dumperOptions = dumperOptions;
    this.resolver = resolver;
    this.name = "Yaml:" + System.identityHashCode(this);
}
项目:snake-yaml    文件:CompactConstructorErrorsTest.java   
public void test1() {
    BaseConstructor compact = new CompactConstructor();
    Yaml yaml = new Yaml(compact);
    String doc = Util.getLocalResource("compactnotation/error1.yaml");
    try {
        yaml.load(doc);
        fail("Package is not specified.");
    } catch (Exception e) {
        assertEquals("java.lang.ClassNotFoundException: Table", e.getMessage());
    }
}
项目:snakeyaml    文件:CompactConstructorErrorsTest.java   
public void test1() {
    BaseConstructor compact = new CompactConstructor();
    Yaml yaml = new Yaml(compact);
    String doc = Util.getLocalResource("compactnotation/error1.yaml");
    try {
        yaml.load(doc);
        fail("Package is not specified.");
    } catch (Exception e) {
        assertEquals("java.lang.ClassNotFoundException: Table", e.getMessage());
    }
}
项目:Camel    文件:SnakeYAMLDataFormat.java   
public BaseConstructor getConstructor() {
    return constructor;
}
项目:Camel    文件:SnakeYAMLDataFormat.java   
/**
 * BaseConstructor to construct incoming documents.
 */
public void setConstructor(BaseConstructor constructor) {
    this.constructor = constructor;
}
项目:TestTheTeacher    文件:Loader.java   
public Loader(BaseConstructor constructor) {
    super();
    this.constructor = constructor;
}
项目:BungeeTabListPlus    文件:YamlConfig.java   
public MyYaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions) {
    super(constructor, representer, dumperOptions);
}
项目:org.openntf.domino    文件:Loader.java   
public Loader(final BaseConstructor constructor) {
    super();
    this.constructor = constructor;
}
项目:AndroidApktool    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 * 
 * @param constructor
 *            BaseConstructor to construct incoming documents
 */
public Yaml(BaseConstructor constructor) {
    this(constructor, new Representer());
}
项目:AndroidApktool    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 * 
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 */
public Yaml(BaseConstructor constructor, Representer representer) {
    this(constructor, representer, new DumperOptions());
}
项目:AndroidApktool    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 * 
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 */
public Yaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions) {
    this(constructor, representer, dumperOptions, new Resolver());
}
项目:5zig-TIMV-Plugin    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 *
 * @param constructor
 *            BaseConstructor to construct incoming documents
 */
public Yaml(BaseConstructor constructor) {
    this(constructor, new Representer());
}
项目:5zig-TIMV-Plugin    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 *
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 */
public Yaml(BaseConstructor constructor, Representer representer) {
    this(constructor, representer, new DumperOptions());
}
项目:5zig-TIMV-Plugin    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 *
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 */
public Yaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions) {
    this(constructor, representer, dumperOptions, new LoaderOptions(), new Resolver());
}
项目:5zig-TIMV-Plugin    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 *
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 * @param loadingConfig
 *            LoadingConfig to control load behavior
 */
public Yaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions,
        LoaderOptions loadingConfig) {
    this(constructor, representer, dumperOptions, loadingConfig, new Resolver());
}
项目:5zig-TIMV-Plugin    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 *
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 * @param resolver
 *            Resolver to detect implicit type
 */
public Yaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions,
        Resolver resolver) {
    this(constructor, representer, dumperOptions, new LoaderOptions(), resolver);
}
项目:snake-yaml    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 * 
 * @param constructor
 *            BaseConstructor to construct incoming documents
 */
public Yaml(BaseConstructor constructor) {
    this(constructor, new Representer());
}
项目:snake-yaml    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 * 
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 */
public Yaml(BaseConstructor constructor, Representer representer) {
    this(constructor, representer, new DumperOptions());
}
项目:snake-yaml    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 * 
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 */
public Yaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions) {
    this(constructor, representer, dumperOptions, new Resolver());
}
项目:SubServers-2    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 *
 * @param constructor
 *            BaseConstructor to construct incoming documents
 */
public Yaml(BaseConstructor constructor) {
    this(constructor, new Representer());
}
项目:SubServers-2    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 *
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 */
public Yaml(BaseConstructor constructor, Representer representer) {
    this(constructor, representer, new DumperOptions());
}
项目:SubServers-2    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 *
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 */
public Yaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions) {
    this(constructor, representer, dumperOptions, new LoaderOptions(), new Resolver());
}
项目:SubServers-2    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 *
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 * @param loadingConfig
 *            LoadingConfig to control load behavior
 */
public Yaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions,
        LoaderOptions loadingConfig) {
    this(constructor, representer, dumperOptions, loadingConfig, new Resolver());
}
项目:SubServers-2    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 *
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 * @param resolver
 *            Resolver to detect implicit type
 */
public Yaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions,
        Resolver resolver) {
    this(constructor, representer, dumperOptions, new LoaderOptions(), resolver);
}
项目:FastAsyncWorldedit    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 *
 * @param constructor
 *            BaseConstructor to construct incoming documents
 */
public Yaml(BaseConstructor constructor) {
    this(constructor, new Representer());
}
项目:FastAsyncWorldedit    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 *
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 */
public Yaml(BaseConstructor constructor, Representer representer) {
    this(constructor, representer, new DumperOptions());
}
项目:FastAsyncWorldedit    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 *
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 */
public Yaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions) {
    this(constructor, representer, dumperOptions, new Resolver());
}
项目:snakeyaml    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 * 
 * @param constructor
 *            BaseConstructor to construct incoming documents
 */
public Yaml(BaseConstructor constructor) {
    this(constructor, new Representer());
}
项目:snakeyaml    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 * 
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 */
public Yaml(BaseConstructor constructor, Representer representer) {
    this(constructor, representer, new DumperOptions());
}
项目:snakeyaml    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 * 
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 */
public Yaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions) {
    this(constructor, representer, dumperOptions, new Resolver());
}
项目:TestTheTeacher    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 * 
 * @param constructor
 *            BaseConstructor to construct incoming documents
 */
public Yaml(BaseConstructor constructor) {
    this(constructor, new Representer());
}
项目:TestTheTeacher    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 * 
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 */
public Yaml(BaseConstructor constructor, Representer representer) {
    this(constructor, representer, new DumperOptions());
}
项目:TestTheTeacher    文件:Yaml.java   
/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 * 
 * @param constructor
 *            BaseConstructor to construct incoming documents
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 */
public Yaml(BaseConstructor constructor, Representer representer, DumperOptions dumperOptions) {
    this(constructor, representer, dumperOptions, new Resolver());
}