Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
SerializableAs.java
1 package org.bukkit.configuration.serialization;
2 
3 import java.lang.annotation.ElementType;
4 import java.lang.annotation.Retention;
5 import java.lang.annotation.RetentionPolicy;
6 import java.lang.annotation.Target;
7 
8 /**
9  * Represents an "alias" that a {@link ConfigurationSerializable} may be
10  * stored as.
11  * If this is not present on a {@link ConfigurationSerializable} class, it
12  * will use the fully qualified name of the class.
13  * <p>
14  * This value will be stored in the configuration so that the configuration
15  * deserialization can determine what type it is.
16  * <p>
17  * Using this annotation on any other class than a {@link
18  * ConfigurationSerializable} will have no effect.
19  *
20  * @see ConfigurationSerialization#registerClass(Class, String)
21  */
22 @Retention(RetentionPolicy.RUNTIME)
23 @Target(ElementType.TYPE)
24 public @interface SerializableAs {
25  /**
26  * This is the name your class will be stored and retrieved as.
27  * <p>
28  * This name MUST be unique. We recommend using names such as
29  * "MyPluginThing" instead of "Thing".
30  *
31  * @return Name to serialize the class as.
32  */
33  public String value();
34 }