Adding/expanding documentation

By: Celtic Minstrel <celtic.minstrel.ca@some.place>
This commit is contained in:
Bukkit/Spigot
2012-02-26 12:13:30 -05:00
parent 795a61bbeb
commit 15e2f69fa6
20 changed files with 162 additions and 16 deletions

View File

@@ -14,6 +14,10 @@ import java.util.Map;
* and returns the class.</li>
* <li>A constructor that accepts a single {@link Map}&lt;{@link String}, {@link Object}>.</li>
* </ul>
* In addition to implementing this interface, you must register the class with
* {@link ConfigurationSerialization#registerClass(Class)}.
* @see DelegateDeserialization
* @see SerializableAs
*/
public interface ConfigurationSerializable {
/**

View File

@@ -199,6 +199,7 @@ public class ConfigurationSerialization {
*
* @param clazz Class to register
* @param alias Alias to register as
* @see SerializableAs
*/
public static void registerClass(Class<? extends ConfigurationSerializable> clazz, String alias) {
aliases.put(alias, clazz);

View File

@@ -6,8 +6,8 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Represents a {@link ConfigurationSerializable} that will delegate all deserialization to another
* {@link ConfigurationSerializable}
* Applies to a {@link ConfigurationSerializable} that will delegate all deserialization to another
* {@link ConfigurationSerializable}.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)

View File

@@ -10,8 +10,12 @@ import java.lang.annotation.Target;
* If this is not present on a {@link ConfigurationSerializable} class, it will use the
* fully qualified name of the class.
* <p>
* This value will be stored in the configuration so that the configuration deserialization
* can determine what type it is.
* <p>
* Using this annotation on any other class than a {@link ConfigurationSerializable} will
* have no effect.
* @see ConfigurationSerialization#registerClass(Class, String)
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)