public final class FileConfigurationFactory
extends java.lang.Object
Constructor and Description |
---|
FileConfigurationFactory() |
Modifier and Type | Method and Description |
---|---|
FileConfiguration |
get(java.io.File file)
Load a fileconfiguration from a file object
|
FileConfiguration |
get(java.lang.String path,
java.lang.String fileContent)
Load a fileconfiguration straight from the file content
|
java.util.Map<java.util.function.Predicate<java.lang.String>,java.lang.Class<? extends AbstractFileConfiguration>> |
getConfigTypes()
Get all config types this factory can map to
|
public FileConfiguration get(java.io.File file) throws java.lang.Exception
file
- File objectjava.lang.Exception
- Will throw if IO, BadConfigType, or UnknownConfigType exceptions are encounteredpublic FileConfiguration get(java.lang.String path, java.lang.String fileContent) throws RPFFileException
path
- Path of the filefileContent
- plain text file contentRPFFileException
- Will throw if bad config type, unknown config type, or reflection issue.public java.util.Map<java.util.function.Predicate<java.lang.String>,java.lang.Class<? extends AbstractFileConfiguration>> getConfigTypes()