public class ObjectDeserializer extends Object
| Constructor and Description |
|---|
ObjectDeserializer() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
create(Class<T> type,
TomlTable group)
Creates an object of type
type initializing fields using the given TomlTable |
static ObjectDeserializer |
getInstance() |
<T extends Enum<T>> |
toEnum(Class<T> type,
Object value)
Returns an instance of the enum T corresponding to the value given
If the value is null, null will be returned
If the value is a long, the enum constant with that ordinal is returned
If the value is a String, the enum constant is returned using the enum's valueOf method.
|
public static ObjectDeserializer getInstance()
public <T> T create(Class<T> type, TomlTable group)
type initializing fields using the given TomlTabletype - group - public <T extends Enum<T>> T toEnum(Class<T> type, Object value)
T - the enum typetype - the class of the enum typevalue - the value to convert to the enumCopyright © 2017. All rights reserved.