Enum Class InjectionPoint
- All Implemented Interfaces:
Serializable
,Comparable<InjectionPoint>
,Constable
Lets you specify at what point in the lifecycle of the plugin the configuration-serializable class should be registered. So you don't have to do this yourself.
If ConfigurationSerializable.as()
or DelegateSerialization.as()
is specified, then the framework will generate
a call to ConfigurationSerialization.registerClass(Class, String)
,
otherwise ConfigurationSerialization.registerClass(Class)
.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionInjects a call toConfigurationSerialization.registerClass(Class, String)
in the class initializer of the serializable class itself.Injects a call toConfigurationSerialization.registerClass(Class, String)
in the plugin's class initializer.Injects a call toConfigurationSerialization.registerClass(Class, String)
in the plugin's constructor(s).Injects a call toConfigurationSerialization.registerClass(Class, String)
in the plugin's onEnable method.Injects a call toConfigurationSerialization.registerClass(Class, String)
in the plugin's onLoad method. -
Method Summary
Modifier and TypeMethodDescriptionstatic InjectionPoint
Returns the enum constant of this class with the specified name.static InjectionPoint[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PLUGIN_ONENABLE
Injects a call toConfigurationSerialization.registerClass(Class, String)
in the plugin's onEnable method. -
PLUGIN_ONLOAD
Injects a call toConfigurationSerialization.registerClass(Class, String)
in the plugin's onLoad method. -
PLUGIN_CONSTRUCTOR
Injects a call toConfigurationSerialization.registerClass(Class, String)
in the plugin's constructor(s). -
PLUGIN_CLASS_INTIALIZER
Injects a call toConfigurationSerialization.registerClass(Class, String)
in the plugin's class initializer. -
CLASS_INITIALIZER
Injects a call toConfigurationSerialization.registerClass(Class, String)
in the class initializer of the serializable class itself. This means that the class won't be registered with Bukkit'sConfigurationSerialization
until the class is loaded, but the class won't be loaded until explicitly done so by your plugin's code.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-