D
- The type of the relevant FileDataType
public class DataHolder<D extends FileDataType> extends Object
FileDataType
and initializes it upon the first
calling. This is meant for adding thread-safety to PluginFile
calls
to PluginFile.getConfig()
for the initialization of the underlying
FileDataType
(thread-safe lazy initialization)Constructor and Description |
---|
DataHolder(Class<D> dataClass)
Initializes this holder
|
Modifier and Type | Method and Description |
---|---|
D |
get(PluginFile source)
Returns (and potentially initializes) the underlying
FileDataType |
public DataHolder(Class<D> dataClass)
dataClass
- A class representing the FileDataType
typepublic D get(PluginFile source)
FileDataType
source
- The PluginFile
calling this methodFileDataType
Copyright © 2015. All rights reserved.