Added new Configuration classes

This commit is contained in:
Dinnerbone
2011-09-19 20:36:44 +01:00
committed by Nathan Adams
parent 4155a42406
commit 55f405f4a8
31 changed files with 3454 additions and 9 deletions

View File

@@ -0,0 +1,28 @@
package org.bukkit.configuration.serialization;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Represents an "alias" that a {@link ConfigurationSerializable} may be stored as.
* If this is not present on a {@link ConfigurationSerializable} class, it will use the
* fully qualified name of the class.
* <p>
* Using this annotation on any other class than a {@link ConfigurationSerializable} will
* have no effect.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface SerializableAs {
/**
* This is the name your class will be stored and retrieved as.
* <p>
* This name MUST be unique. We recommend using names such as "MyPluginThing" instead of
* "Thing".
*
* @return Name to serialize the class as.
*/
public String value();
}