public static class EnumWrappers.EnumConverter<T extends Enum<T>> extends Object implements EquivalentConverter<T>
| Constructor and Description |
|---|
EnumConverter(Class<T> specificType) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getGeneric(Class<?> genericType,
T specific)
Retrieve a copy of the generic type from a specific type.
|
T |
getSpecific(Object generic)
Retrieve a copy of the specific type using an instance of the generic type.
|
Class<T> |
getSpecificType()
Due to type erasion, we need to explicitly keep a reference to the specific type.
|
public T getSpecific(Object generic)
EquivalentConverterThis is usually a wrapper type in the Bukkit API.
getSpecific in interface EquivalentConverter<T extends Enum<T>>generic - - the generic type.public Object getGeneric(Class<?> genericType, T specific)
EquivalentConverterThis is usually a native net.minecraft.server type in Minecraft.
getGeneric in interface EquivalentConverter<T extends Enum<T>>genericType - - class or super class of the generic type.specific - - the specific type we need to copy.public Class<T> getSpecificType()
EquivalentConvertergetSpecificType in interface EquivalentConverter<T extends Enum<T>>Copyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.