Javadoc updates
Fixes BUKKIT-1653, Fixes BUKKIT-1383 and Fixes BUKKIT-1644 By: feildmaster <admin@feildmaster.com>
This commit is contained in:
@@ -38,7 +38,7 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Saves this {@link FileConfiguration} to the specified location.
|
||||
* <p>
|
||||
* <p />
|
||||
* If the file does not exist, it will be created. If already exists, it will
|
||||
* be overwritten. If it cannot be overwritten or created, an exception will be thrown.
|
||||
*
|
||||
@@ -64,7 +64,7 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Saves this {@link FileConfiguration} to the specified location.
|
||||
* <p>
|
||||
* <p />
|
||||
* If the file does not exist, it will be created. If already exists, it will
|
||||
* be overwritten. If it cannot be overwritten or created, an exception will be thrown.
|
||||
*
|
||||
@@ -87,10 +87,10 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Loads this {@link FileConfiguration} from the specified location.
|
||||
* <p>
|
||||
* <p />
|
||||
* All the values contained within this configuration will be removed, leaving
|
||||
* only settings and defaults, and the new values will be loaded from the given file.
|
||||
* <p>
|
||||
* <p />
|
||||
* If the file cannot be loaded for any reason, an exception will be thrown.
|
||||
*
|
||||
* @param file File to load from.
|
||||
@@ -107,7 +107,7 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Loads this {@link FileConfiguration} from the specified stream.
|
||||
* <p>
|
||||
* <p />
|
||||
* All the values contained within this configuration will be removed, leaving
|
||||
* only settings and defaults, and the new values will be loaded from the given stream.
|
||||
*
|
||||
@@ -140,10 +140,10 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Loads this {@link FileConfiguration} from the specified location.
|
||||
* <p>
|
||||
* <p />
|
||||
* All the values contained within this configuration will be removed, leaving
|
||||
* only settings and defaults, and the new values will be loaded from the given file.
|
||||
* <p>
|
||||
* <p />
|
||||
* If the file cannot be loaded for any reason, an exception will be thrown.
|
||||
*
|
||||
* @param file File to load from.
|
||||
@@ -160,10 +160,10 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Loads this {@link FileConfiguration} from the specified string, as opposed to from file.
|
||||
* <p>
|
||||
* <p />
|
||||
* All the values contained within this configuration will be removed, leaving
|
||||
* only settings and defaults, and the new values will be loaded from the given string.
|
||||
* <p>
|
||||
* <p />
|
||||
* If the string is invalid in any way, an exception will be thrown.
|
||||
*
|
||||
* @param contents Contents of a Configuration to load.
|
||||
@@ -174,7 +174,7 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Compiles the header for this {@link FileConfiguration} and returns the result.
|
||||
* <p>
|
||||
* <p />
|
||||
* This will use the header from {@link #options()} -> {@link FileConfigurationOptions#header()},
|
||||
* respecting the rules of {@link FileConfigurationOptions#copyHeader()} if set.
|
||||
*
|
||||
|
||||
@@ -32,12 +32,12 @@ public class FileConfigurationOptions extends MemoryConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Gets the header that will be applied to the top of the saved output.
|
||||
* <p>
|
||||
* <p />
|
||||
* This header will be commented out and applied directly at the top of the
|
||||
* generated output of the {@link FileConfiguration}. It is not required to
|
||||
* include a newline at the end of the header as it will automatically be applied,
|
||||
* but you may include one if you wish for extra spacing.
|
||||
* <p>
|
||||
* <p />
|
||||
* Null is a valid value which will indicate that no header is to be applied.
|
||||
* The default value is null.
|
||||
*
|
||||
@@ -49,12 +49,12 @@ public class FileConfigurationOptions extends MemoryConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Sets the header that will be applied to the top of the saved output.
|
||||
* <p>
|
||||
* <p />
|
||||
* This header will be commented out and applied directly at the top of the
|
||||
* generated output of the {@link FileConfiguration}. It is not required to
|
||||
* include a newline at the end of the header as it will automatically be applied,
|
||||
* but you may include one if you wish for extra spacing.
|
||||
* <p>
|
||||
* <p />
|
||||
* Null is a valid value which will indicate that no header is to be applied.
|
||||
*
|
||||
* @param value New header
|
||||
@@ -67,15 +67,15 @@ public class FileConfigurationOptions extends MemoryConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Gets whether or not the header should be copied from a default source.
|
||||
* <p>
|
||||
* <p />
|
||||
* If this is true, if a default {@link FileConfiguration} is passed to
|
||||
* {@link FileConfiguration#setDefaults(org.bukkit.configuration.Configuration)}
|
||||
* then upon saving it will use the header from that config, instead of the one provided here.
|
||||
* <p>
|
||||
* <p />
|
||||
* If no default is set on the configuration, or the default is not of type FileConfiguration,
|
||||
* or that config has no header ({@link #header()} returns null) then the header
|
||||
* specified in this configuration will be used.
|
||||
* <p>
|
||||
* <p />
|
||||
* Defaults to true.
|
||||
*
|
||||
* @return Whether or not to copy the header
|
||||
@@ -86,15 +86,15 @@ public class FileConfigurationOptions extends MemoryConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Sets whether or not the header should be copied from a default source.
|
||||
* <p>
|
||||
* <p />
|
||||
* If this is true, if a default {@link FileConfiguration} is passed to
|
||||
* {@link FileConfiguration#setDefaults(org.bukkit.configuration.Configuration)}
|
||||
* then upon saving it will use the header from that config, instead of the one provided here.
|
||||
* <p>
|
||||
* <p />
|
||||
* If no default is set on the configuration, or the default is not of type FileConfiguration,
|
||||
* or that config has no header ({@link #header()} returns null) then the header
|
||||
* specified in this configuration will be used.
|
||||
* <p>
|
||||
* <p />
|
||||
* Defaults to true.
|
||||
*
|
||||
* @param value Whether or not to copy the header
|
||||
|
||||
@@ -19,6 +19,7 @@ import org.yaml.snakeyaml.representer.Representer;
|
||||
|
||||
/**
|
||||
* An implementation of {@link Configuration} which saves all files in Yaml.
|
||||
* Note that this implementation is not synchronized.
|
||||
*/
|
||||
public class YamlConfiguration extends FileConfiguration {
|
||||
protected static final String COMMENT_PREFIX = "# ";
|
||||
@@ -157,13 +158,13 @@ public class YamlConfiguration extends FileConfiguration {
|
||||
|
||||
/**
|
||||
* Creates a new {@link YamlConfiguration}, loading from the given file.
|
||||
* <p>
|
||||
* <p />
|
||||
* Any errors loading the Configuration will be logged and then ignored.
|
||||
* If the specified input is not a valid config, a blank config will be returned.
|
||||
*
|
||||
* @param file Input file
|
||||
* @return Resulting configuration
|
||||
* @throws IllegalArgumentException Thrown is file is null
|
||||
* @throws IllegalArgumentException Thrown if file is null
|
||||
*/
|
||||
public static YamlConfiguration loadConfiguration(File file) {
|
||||
Validate.notNull(file, "File cannot be null");
|
||||
@@ -184,13 +185,13 @@ public class YamlConfiguration extends FileConfiguration {
|
||||
|
||||
/**
|
||||
* Creates a new {@link YamlConfiguration}, loading from the given stream.
|
||||
* <p>
|
||||
* <p />
|
||||
* Any errors loading the Configuration will be logged and then ignored.
|
||||
* If the specified input is not a valid config, a blank config will be returned.
|
||||
*
|
||||
* @param stream Input stream
|
||||
* @return Resulting configuration
|
||||
* @throws IllegalArgumentException Thrown is stream is null
|
||||
* @throws IllegalArgumentException Thrown if stream is null
|
||||
*/
|
||||
public static YamlConfiguration loadConfiguration(InputStream stream) {
|
||||
Validate.notNull(stream, "Stream cannot be null");
|
||||
|
||||
@@ -43,7 +43,7 @@ public class YamlConfigurationOptions extends FileConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Gets how much spaces should be used to indent each line.
|
||||
* <p>
|
||||
* <p />
|
||||
* The minimum value this may be is 2, and the maximum is 9.
|
||||
*
|
||||
* @return How much to indent by
|
||||
@@ -54,7 +54,7 @@ public class YamlConfigurationOptions extends FileConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Sets how much spaces should be used to indent each line.
|
||||
* <p>
|
||||
* <p />
|
||||
* The minimum value this may be is 2, and the maximum is 9.
|
||||
*
|
||||
* @param value New indent
|
||||
|
||||
Reference in New Issue
Block a user