Class Enum<E extends Enum<E>>
java.lang.Object
xyz.janboerman.scalaloader.configurationserializable.runtime.types.Enum<E>
- All Implemented Interfaces:
ConfigurationSerializable
,Adapter<E>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <ScalaPluginClassLoader extends ClassLoader & IScalaPluginClassLoader>
ConfigurationSerializableGet an instance that represents the enum value that is configuration-serializable.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface xyz.janboerman.scalaloader.configurationserializable.runtime.Adapter
getValue
Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
-
Constructor Details
-
Enum
protected Enum()
-
-
Method Details
-
forEnum
public static <ScalaPluginClassLoader extends ClassLoader & IScalaPluginClassLoader> ConfigurationSerializable forEnum(Enum<?> enumValue, ScalaPluginClassLoader classLoader) Get an instance that represents the enum value that is configuration-serializable. If the enum itself is configuration-serializable, then than it is immediately returned. Otherwise, a wrapper is used.- Parameters:
enumValue
- a value in an enumerationclassLoader
- the ScalaPlugin's classloader- Returns:
- the configuration-serializable enum value.
-