mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 12:13:54 -07:00
Adding/expanding documentation
By: Celtic Minstrel <celtic.minstrel.ca@some.place>
This commit is contained in:
@@ -14,6 +14,10 @@ import java.util.Map;
|
||||
* and returns the class.</li>
|
||||
* <li>A constructor that accepts a single {@link Map}<{@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 {
|
||||
/**
|
||||
|
@@ -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);
|
||||
|
@@ -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)
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user