當前位置: 首頁>>代碼示例>>Java>>正文


Java Representer.setDefaultScalarStyle方法代碼示例

本文整理匯總了Java中org.yaml.snakeyaml.representer.Representer.setDefaultScalarStyle方法的典型用法代碼示例。如果您正苦於以下問題:Java Representer.setDefaultScalarStyle方法的具體用法?Java Representer.setDefaultScalarStyle怎麽用?Java Representer.setDefaultScalarStyle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.yaml.snakeyaml.representer.Representer的用法示例。


在下文中一共展示了Representer.setDefaultScalarStyle方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: Yaml

import org.yaml.snakeyaml.representer.Representer; //導入方法依賴的package包/類
/**
 * 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);
}
 
開發者ID:imkiva,項目名稱:AndroidApktool,代碼行數:32,代碼來源:Yaml.java

示例2: Yaml

import org.yaml.snakeyaml.representer.Representer; //導入方法依賴的package包/類
/**
 * 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);
}
 
開發者ID:RoccoDev,項目名稱:5zig-TIMV-Plugin,代碼行數:39,代碼來源:Yaml.java

示例3: Yaml

import org.yaml.snakeyaml.representer.Representer; //導入方法依賴的package包/類
/**
 * 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);
}
 
開發者ID:boy0001,項目名稱:FastAsyncWorldedit,代碼行數:32,代碼來源:Yaml.java

示例4: Yaml

import org.yaml.snakeyaml.representer.Representer; //導入方法依賴的package包/類
/**
 * 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);
}
 
開發者ID:OpenNTF,項目名稱:org.openntf.domino,代碼行數:29,代碼來源:Yaml.java


注:本文中的org.yaml.snakeyaml.representer.Representer.setDefaultScalarStyle方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。