@Retention(value=RUNTIME) @Target(value=FIELD) public @interface Persist
PersistenceLoader
to persist this field by saving and loading it into DataKey
s.Modifier and Type | Optional Element and Description |
---|---|
Class<?> |
collectionType
The specialised collection type to use when a super class is specified.
|
boolean |
reify
Whether to use PersistenceLoader to load/save the value of this class.
|
boolean |
required
Whether a value must be present at load time.
|
String |
value
The save key to use when saving.
|
Class<?> |
valueType
The specific value type to use when deserialising values from storage.
|
public abstract Class<?> collectionType
public abstract boolean reify
public abstract boolean required
PersistenceLoader.load(Object, DataKey)
will return null.public abstract String value
@Persist
-> root key + field name@Persist("")
-> root key + "" (or simply root key)@Persist("sub")
root key + "sub"public abstract Class<?> valueType
Copyright © 2021. All rights reserved.