public final class YamlEngine extends Object
| 构造器和说明 |
|---|
YamlEngine() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
marshal(Object value)
Marshal YAML.
|
static String |
marshal(Object value,
Collection<TupleProcessor> tupleProcessors)
Marshal YAML.
|
static <T extends YamlConfiguration> |
unmarshal(byte[] yamlBytes,
Class<T> classType)
Unmarshal YAML.
|
static <T extends YamlConfiguration> |
unmarshal(byte[] yamlBytes,
Class<T> classType,
org.yaml.snakeyaml.constructor.Constructor classConstructor)
Unmarshal YAML.
|
static <T extends YamlConfiguration> |
unmarshal(File yamlFile,
Class<T> classType)
Unmarshal YAML.
|
static <T extends YamlConfiguration> |
unmarshal(File yamlFile,
Class<T> classType,
org.yaml.snakeyaml.constructor.Constructor classConstructor)
Unmarshal YAML.
|
static Map<?,?> |
unmarshal(String yamlContent)
Unmarshal YAML.
|
static <T> T |
unmarshal(String yamlContent,
Class<T> classType)
Unmarshal YAML.
|
static <T> T |
unmarshal(String yamlContent,
Class<T> classType,
org.yaml.snakeyaml.constructor.Constructor classConstructor)
Unmarshal YAML.
|
static Properties |
unmarshalProperties(String yamlContent)
Unmarshal properties YAML.
|
public static <T extends YamlConfiguration> T unmarshal(File yamlFile, Class<T> classType) throws IOException
T - type of classyamlFile - YAML fileclassType - class typeIOException - IO Exceptionpublic static <T extends YamlConfiguration> T unmarshal(File yamlFile, Class<T> classType, org.yaml.snakeyaml.constructor.Constructor classConstructor) throws IOException
T - type of classyamlFile - YAML fileclassType - class typeclassConstructor - class constructorIOException - IO Exceptionpublic static <T extends YamlConfiguration> T unmarshal(byte[] yamlBytes, Class<T> classType) throws IOException
T - type of classyamlBytes - YAML bytesclassType - class typeIOException - IO Exceptionpublic static <T extends YamlConfiguration> T unmarshal(byte[] yamlBytes, Class<T> classType, org.yaml.snakeyaml.constructor.Constructor classConstructor) throws IOException
T - type of classyamlBytes - YAML bytesclassType - class typeclassConstructor - class constructorIOException - IO Exceptionpublic static <T> T unmarshal(String yamlContent, Class<T> classType)
T - type of classyamlContent - YAML contentclassType - class typepublic static <T> T unmarshal(String yamlContent, Class<T> classType, org.yaml.snakeyaml.constructor.Constructor classConstructor)
T - type of classyamlContent - YAML contentclassType - class typeclassConstructor - class constructorpublic static Map<?,?> unmarshal(String yamlContent)
yamlContent - YAML contentpublic static Properties unmarshalProperties(String yamlContent)
yamlContent - YAML contentpublic static String marshal(Object value)
value - object to be marshaledpublic static String marshal(Object value, Collection<TupleProcessor> tupleProcessors)
value - object to be marshaledtupleProcessors - tuple processorsCopyright © 2020 The Apache Software Foundation. All rights reserved.