|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.yamlbeans.YamlReader
public class YamlReader
Deserializes Java objects from YAML.
| Nested Class Summary | |
|---|---|
class |
YamlReader.YamlReaderException
|
| Constructor Summary | |
|---|---|
YamlReader(java.io.Reader reader)
|
|
YamlReader(java.io.Reader reader,
YamlConfig config)
|
|
YamlReader(java.lang.String yaml)
|
|
YamlReader(java.lang.String yaml,
YamlConfig config)
|
|
| Method Summary | ||
|---|---|---|
void |
close()
|
|
protected java.lang.Object |
createObject(java.lang.Class type)
Returns a new object of the requested type. |
|
YamlConfig |
getConfig()
|
|
static void |
main(java.lang.String[] args)
|
|
java.lang.Object |
read()
Reads the next YAML document and deserializes it into an object. |
|
|
read(java.lang.Class<T> type)
Reads an object of the specified type from YAML. |
|
|
read(java.lang.Class<T> type,
java.lang.Class elementType)
Reads an array, Map, List, or Collection object of the specified type from YAML, using the specified element type. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public YamlReader(java.io.Reader reader)
public YamlReader(java.io.Reader reader,
YamlConfig config)
public YamlReader(java.lang.String yaml)
public YamlReader(java.lang.String yaml,
YamlConfig config)
| Method Detail |
|---|
public YamlConfig getConfig()
public void close()
throws java.io.IOException
java.io.IOException
public java.lang.Object read()
throws YamlException
ArrayList, HashMap, or String.
YamlException
public <T> T read(java.lang.Class<T> type)
throws YamlException
type - The type of object to read. If null, behaves the same as {read().
YamlException
public <T> T read(java.lang.Class<T> type,
java.lang.Class elementType)
throws YamlException
type - The type of object to read. If null, behaves the same as {read().
YamlException
protected java.lang.Object createObject(java.lang.Class type)
throws java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||