public interface InfoFile
Modifier and Type | Method and Description |
---|---|
default Object |
get()
Gets the current object in memory
|
default FileDataType |
getConfig()
Returns the relevant
FileDataType for this file. |
DataHolder<? extends FileDataType> |
getData()
Returns the relevant
DataHolder for this file, which provides
thread-safety for the FileDataType object initialization |
Object |
getDefault()
Returns the default value of the key
|
default File |
getFileLocation() |
String |
getPath()
The
FileDataType path to store this value in |
default <T extends FileDataType> |
init(Class<T> clazz)
Loads the
InfoFile values from the configuration file. |
default void |
save()
Saves the current file data from memory
|
default void |
save(File file)
Saves the current file data from memory to a specific
File |
String getPath()
FileDataType
path to store this value inObject getDefault()
default FileDataType getConfig()
FileDataType
for this file.FileDataType
of this ConfigFile
default Object get()
DataHolder<? extends FileDataType> getData()
DataHolder
for this file, which provides
thread-safety for the FileDataType
object initializationDataHolder
for this InfoFile
default File getFileLocation()
default <T extends FileDataType> T init(Class<T> clazz)
InfoFile
values from the configuration file.
Safe to use for reloadingT
- The type of FileDataType
to returnclazz
- The Class
of the returned FileDataType
FileDataType
for all the file infodefault void save() throws IOException
IOException
- Failed to save to the filedefault void save(File file) throws IOException
File
file
- The file to save toIOException
- Failed to save to the fileCopyright © 2017. All rights reserved.