org.yaml.snakeyaml.resolver.Resolver.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(8.2k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中org.yaml.snakeyaml.resolver.Resolver.<init>方法的一些代码示例,展示了Resolver.<init>的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Resolver.<init>方法的具体详情如下:
包路径:org.yaml.snakeyaml.resolver.Resolver
类名称:Resolver
方法名:<init>

Resolver.<init>介绍

暂无

代码示例

代码示例来源:origin: redisson/redisson

/**
 * 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());
}

代码示例来源:origin: redisson/redisson

/**
 * 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());
}

代码示例来源:origin: redisson/redisson

/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 *
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 */
public Yaml(Representer representer, DumperOptions dumperOptions) {
  this(new Constructor(), representer, dumperOptions, new LoaderOptions(), new Resolver());
}

代码示例来源:origin: redisson/redisson

/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 */
public Yaml() {
  this(new Constructor(), new Representer(), new DumperOptions(), new LoaderOptions(),
      new Resolver());
}

代码示例来源:origin: stackoverflow.com

var Resolver = require('async-resolve');
var resolver_obj = new Resolver();
resolver_obj.resolve('module', __dirname, function(err, filename) {
 return console.log(filename);
});

代码示例来源:origin: pl.droidsonroids.yaml/snakeyaml

/**
 * 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());
}

代码示例来源:origin: harbby/presto-connectors

/**
 * 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());
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * 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());
}

代码示例来源:origin: stackoverflow.com

DocumentBuilder builder = factory.newDocumentBuilder();
Resolver res = new Resolver();
builder.setEntityResolver(res);
Document doc = builder.parse("YOUR XML FILE");

代码示例来源:origin: pl.droidsonroids.yaml/snakeyaml

/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 * 
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 */
public Yaml(Representer representer, DumperOptions dumperOptions) {
  this(new Constructor(), representer, dumperOptions, new Resolver());
}

代码示例来源:origin: harbby/presto-connectors

/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 * 
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 */
public Yaml(Representer representer, DumperOptions dumperOptions) {
  this(new Constructor(), representer, dumperOptions, new Resolver());
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * 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());
}

代码示例来源:origin: stackoverflow.com

InputStream parsingStream = new FileInputStream(file)
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();

builder.setEntityResolver(new Resolver());
Document doc = builder.parse( parsingStream );

ByteArrayOutputStream outputStream = new ByteArrayOutputStream();    
DOMImplementationLS domImplementationLS = (DOMImplementationLS)doc.getImplementation().getFeature( "LS", "3.0" );
LSOutput lsOutput = domImplementationLS.createLSOutput();
lsOutput.setByteStream( outputStream );
LSSerializer lsSerializer = domImplementationLS.createLSSerializer();
lsSerializer.write( doc, lsOutput );
byte[] byteArray = outputStream.toByteArray();

ByteArrayInputStream importStream = new ByteArrayInputStream( byteArray );
Preferences.importPreferences( importStream );

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 *
 * @param representer
 *            Representer to emit outgoing objects
 * @param dumperOptions
 *            DumperOptions to configure outgoing objects
 */
public Yaml(Representer representer, DumperOptions dumperOptions) {
  this(new Constructor(), representer, dumperOptions, new LoaderOptions(), new Resolver());
}

代码示例来源:origin: sonatype-nexus-community/nexus-repository-helm

public void write(final OutputStream os, final ChartIndex index) {
 try (OutputStreamWriter writer = new OutputStreamWriter(os)) {
  Yaml yaml = new Yaml(new JodaPropertyConstructor(),
    setupRepresenter(),
    new DumperOptions(),
    new Resolver());
  String result = yaml.dumpAsMap(index);
  writer.write(result);
 }
 catch (IOException ex) {
  log.error("Unable to write to OutputStream for index.yaml", ex);
 }
}

代码示例来源:origin: sonatype-nexus-community/nexus-repository-helm

public Map<String, Object> load(InputStream is) throws IOException {
 checkNotNull(is);
 String data = IOUtils.toString(new UnicodeReader(is));
 Map<String, Object> map;
 try {
  Yaml yaml = new Yaml(new Constructor(), new Representer(),
    new DumperOptions(), new Resolver());
  map = (Map<String, Object>) yaml.load(data);
 }
 catch (YAMLException e) {
  map = (Map<String, Object>) mapper.readValue(data, Map.class);
 }
 return map;
}

代码示例来源:origin: harbby/presto-connectors

/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 */
public Yaml() {
  this(new Constructor(), new Representer(), new DumperOptions(), new Resolver());
}

代码示例来源:origin: pl.droidsonroids.yaml/snakeyaml

/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 */
public Yaml() {
  this(new Constructor(), new Representer(), new DumperOptions(), new Resolver());
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Create Yaml instance. It is safe to create a few instances and use them
 * in different Threads.
 */
public Yaml() {
  this(new Constructor(), new Representer(), new DumperOptions(), new LoaderOptions(),
      new Resolver());
}

代码示例来源:origin: org.onehippo.cms/hippo-configuration-management-model

public void serializeNode(final Writer writer, final Node node) throws IOException {
  final DumperOptions dumperOptions = new DumperOptions();
  if (explicitSequencing) {
    dumperOptions.setIndicatorIndent(2);
    dumperOptions.setIndent(4);
  } else {
    dumperOptions.setIndicatorIndent(0);
    dumperOptions.setIndent(2);
  }
  final Resolver resolver = new Resolver();
  final Serializer serializer = new Serializer(new Emitter(writer, dumperOptions), resolver, dumperOptions, null);
  serializer.open();
  serializer.serialize(node);
  serializer.close();
}

相关文章